-
Notifications
You must be signed in to change notification settings - Fork 618
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
[bad error message] net=host can't handle adding extra hosts #620
Comments
@pbecotte Thanks for reporting. What Docker versions are you using with ECS and locally to test? It looks like For example, when I try to run
|
I am sorry, I must have gotten my terminal windows confused and run that on my laptop. I tried it on my ECS machine with 1.11.2 and got the same result you did. So- this would be a big with version 1.12, but is not a bug with 1.11.2 (though the error message is horrid...). I am not sure how to handle this issue :) |
Yeah, it's a pretty terrible error message. The "container already exists" message comes from the Docker API returning a 409 Conflict HTTP error rather than an error code indicating that there's actually something wrong with the options (400 Bad Request seems more appropriate). As another approach to fixing this, we can:
I'm going to leave this open until we've addressed this by either making the error message better or fixing the capabilities required for task definitions specified with those fields. |
closing this issue since the suggested fix for adding API 1.24 is already in the current release. |
@adnxn Did we adjust the attribute inference logic such that |
@samuelkarp, nope. Reopening to track service side changes. |
We have updated the attribute inference logic on the service side to infer |
Am trying to run a multi-container service with net=host. The main container communicates (currently) with the other services by dns name through links. To try and duplicate the existing behavior (instead of changing the code to look for localhost) I tried to add the hostnames to the
extraHosts
command. Adding entries here causes the container to fail to be created withI created a minimal task definition that demonstrates the problem
Just to be sure, running the following commands from a docker client (which should be pretty close to the above implementation) does work to demonstrate that the daemon can handle
add-host
combined withnet=host
...docker run -d --net=host redis
docker run --net=host --add-host redis:127.0.0.1 redis redis-cli -h redis set basekey 1
The text was updated successfully, but these errors were encountered: