Skip to content
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

[docker] Fix the ecs tags fetching #1932

Merged
merged 2 commits into from
Sep 22, 2015
Merged

Conversation

hkaj
Copy link
Member

@hkaj hkaj commented Sep 18, 2015

No description provided.

@@ -364,8 +364,8 @@ def refresh_ecs_tags(self):
ecs_tags = {}
if net_conf:
net_conf = net_conf[0] if isinstance(net_conf, list) else net_conf
ip, port = net_conf.get('HostIp'), net_conf.get('HostPort')
tasks = requests.get('http://%s:%s' % (ip, port)).json()
ip, port = ecs_config['NetworkSettings']['IPAddress'], net_conf.get('HostPort')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't want use the HostPort here as it's, well, the host port :)
You want to use the container port instead which is in the key of this dictionary:

{u'51678/tcp': [{u'HostPort': u'51678', u'HostIp': u'127.0.0.1'}]}

@remh
Copy link

remh commented Sep 21, 2015

Thanks for fixing this, added a small comment

remh pushed a commit that referenced this pull request Sep 22, 2015
@remh remh merged commit 7521fb0 into master Sep 22, 2015
@remh remh added this to the 5.5.1 milestone Sep 22, 2015
@hkaj hkaj deleted the haissam/fix-ecs-tags-fetching branch September 24, 2015 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants