Amazon-ecs-agent: HostPort not present in ECS Task Metadata Endpoint response with bridge network type

Created on 9 Jun 2020  路  3Comments  路  Source: aws/amazon-ecs-agent

Summary

HostPort not present in ECS Task Metadata Endpoint response with bridge network type

Description

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

Expected Behavior

Host port is also present in Endpoint response

Observed Behavior

Host port is missing

Environment Details

ECS Agent version: 1.39.0

kinbug

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soumyasmruti picture soumyasmruti  路  5Comments

hayajo picture hayajo  路  3Comments

pspanchal picture pspanchal  路  3Comments

leonblueconic picture leonblueconic  路  3Comments

flowirtz picture flowirtz  路  5Comments