-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Make Swarm schedule containers on the same node when they are linked together #972
Conversation
Looks like HostConfig on create has been available since 1.3.0 - https://github.com/docker/docker/blob/v1.3.0/daemon/create.go#L31 |
@cpuguy83 Interesting - looks like this wasn't made official until API version 1.15: http://docs.docker.com/reference/api/docker_remote_api/#v115 @dnephin Yeah, we really need a better setup. I'm looking into it. |
aabaec1
to
0d4435c
Compare
0d4435c
to
1918cfb
Compare
Rebased. |
1918cfb
to
3e5d0fb
Compare
print(container.name) | ||
else: | ||
service.start_container(container, ports=service_ports, one_off=True) | ||
service.start_container(container) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor (since it's existing), this is being done in both branches of the is/else, so it should really happen before the branch.
LGTM (assuming there is still some place to run the automated test suite with the new dependency on docker 1.4.1) |
@dnephin Now testing on Jenkins against multiple Docker versions! Should this not work on Docker <1.4 though? Hm. Seems like it is. |
@bfirsh I believe the only issue was the api version change ( |
Built Docker Compose from the 'set-host-config-at-create-time' branch. |
d45980a
to
6f9448f
Compare
This is required for Swarm integration: the cluster needs to know about config like `links` and `volumes_from` at create time so that it can co-schedule containers. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
6f9448f
to
eef4bc3
Compare
I've reverted the documentation changes. The API version has changed, but 1.3 is still the minimum version. (This is largely irrelevant anyway, as we'll be making 1.6 the minimum in the next release.) |
Make Swarm schedule containers on the same node when they are linked together
Make Swarm schedule containers on the same node when they are linked together Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
... by specifying all HostConfig at create time. This is required for Swarm integration: the cluster needs to know about config like
links
andvolumes_from
at create time so that it can co-schedule containers. This is particularly important because we rely onvolumes_from
when recreating containers - if the old/intermediate/new containers aren't co-scheduled, they'll fail to start.Because the ability to specify HostConfig at create time was introduced in Docker 1.4, that's our new minimum version requirement. The install docs have been updated accordingly.