Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MartinMitro opened this issue Jun 9, 2020 · 3 comments
Labels
Milestone

Comments

@MartinMitro
Copy link

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

@mythri-garaga
Copy link
Contributor

Could you please send the task definition(json file) to ecs-agent-external at amazon.com?

@sharanyad
Copy link
Contributor

Thanks for the information @MartinMitro . This has been identified as a bug in agent where ports for metadata http response comes from

Ports []PortBinding `json:"portMappings"`
whereas for the metadata file, it comes from
KnownPortBindingsUnsafe []PortBinding `json:"KnownPortBindings"`

We will work on fixing this.

@cyastella
Copy link
Contributor

This is fixed in agent 1.41.1 Please update to latest version, and if you still find issue let us know. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants