HostPort not present in ECS Task Metadata Endpoint response with bridge network type
I have a Task with bridge network type. When executing
curl $ECS_CONTAINER_METADATA_URI_V4/task
I see that host port is missing in response, however I can find it when reading ECS_CONTAINER_METADATA_FILE
Host port is also present in Endpoint response
Host port is missing
ECS Agent version: 1.39.0
Could you please send the task definition(json file) to ecs-agent-external at amazon.com?
Thanks for the information @MartinMitro . This has been identified as a bug in agent where ports for metadata http response comes from https://github.com/aws/amazon-ecs-agent/blob/3776bee911c2267dedce46a9d2a17007f0bd73ae/agent/api/container/container.go#L143 whereas for the metadata file, it comes from https://github.com/aws/amazon-ecs-agent/blob/3776bee911c2267dedce46a9d2a17007f0bd73ae/agent/api/container/container.go#L248
We will work on fixing this.
This is fixed in agent聽1.41.1 Please update to latest version, and if you still find issue let us know. Thanks.