Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

make docker daemon initiated container (re)start work properly #401

Closed
rade opened this issue Feb 17, 2015 · 4 comments
Closed

make docker daemon initiated container (re)start work properly #401

rade opened this issue Feb 17, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@rade
Copy link
Member

rade commented Feb 17, 2015

The docker daemon can decide to (re)start containers, e.g. after a reboot or when a --restart policy was specified for the container.

We want this to work properly for a) the weave container and any similar weave infrastructure containers (such as weavedns), b) application containers. In the latter case this would entail re-attaching to the weave network, and re-registering with weavedns.

This does require bits of #230/#312/#117.

@bboreham
Copy link
Contributor

It would be nice if the container came back with the same IP address after a restart, as described in #1047.

@rade
Copy link
Member Author

rade commented Jul 8, 2015

Presumably any containers started via the proxy will hang in weavewait when restarted by docker.

The proxy, or a separate container, could take care of re-attaching containers. This won't work on docker restart though, since the proxy may not be running yet. Though I guess we could scan all containers on proxy startup and attach any that are weavewait-ing.

@rade rade modified the milestone: 1.1.0 Jul 8, 2015
@bboreham
Copy link
Contributor

This won't work on docker restart though, since the proxy may not be running yet

The Docker Event mechanism allows clients to fetch events from before the time they were started, so this is not an issue.

Doing that brings a different issue: what if the proxy itself is restarted, and queries for past events, and thus gets told of the start of containers that it already attached to weave (before the proxy was restarted)?

Maybe we can rely on attachment being idempotent, or maybe we can check before attaching.

@bboreham
Copy link
Contributor

The fix in #1210 does not do (a) in the original description - dealing with restart of weave itself.
So there is an extra fix in #1359 for that part.

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

No branches or pull requests

2 participants