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

Retain IP address for container across restart #1047

Closed
bboreham opened this issue Jun 29, 2015 · 10 comments · Fixed by #1191
Closed

Retain IP address for container across restart #1047

bboreham opened this issue Jun 29, 2015 · 10 comments · Fixed by #1191

Comments

@bboreham
Copy link
Contributor

from IRC

If you use docker restart then weave should arrange that the container retains its IP
address.

(Note that restart is indeed a Docker daemon command)

This could be viewed as a sub-case of #599, IP address mobility.

@rade
Copy link
Member

rade commented Jun 29, 2015

Surely that's more of an IPAM issue. We free the IP when the container dies, which it does as part of restart. If it wasn't for that then this would "just work", since IPAM for a specific container & network will hand back the same address if called repeatedly.

So if we really want this feature (use case?) then IPAM needs to distinguish restarts from deaths.

Or was the idea somehow that the proxy would intercept the restart and tell IPAM to ignore the container death that follows?

@bboreham
Copy link
Contributor Author

Yes, the proxy sees the restart command and hence could know what to do.

@rade
Copy link
Member

rade commented Jun 29, 2015

IPAM cannot detect restarts from the event stream?

@rade
Copy link
Member

rade commented Jun 29, 2015

Surely we should also file an issue for doing this when the container is restarted by a restart policy.

@bboreham
Copy link
Contributor Author

If the container is restarted without weave being involved, then we can't attach an interface to the weave network. Which is certainly an issue, but probably not this issue.

That leaves the proxy, already discussed, and the weave script, which doesn't have a restart command.

@bboreham
Copy link
Contributor Author

There is a restart event.

According to this blog it comes after the die and start events.

@rade
Copy link
Member

rade commented Jun 29, 2015

yes, I saw. How very useful.

@bboreham
Copy link
Contributor Author

Restoring the network interface on daemon-controlled restart is captured as #401

@rade
Copy link
Member

rade commented Jun 29, 2015

the weave script, which doesn't have a restart command.

Hmm. So how do we make this work for containers started with weave run? I suppose we could decide not to bother. Just as we didn't with #400.

And what happens when containers have been attached to weave with weave attach? See #688.

@rade rade modified the milestone: current Jul 7, 2015
@bboreham
Copy link
Contributor Author

Referencing the similar Docker issue moby/moby#2801

@bboreham bboreham self-assigned this Jul 17, 2015
@rade rade modified the milestone: current Sep 4, 2015
@rade rade modified the milestone: 1.3.0 Oct 29, 2015
@awh awh removed this from the 1.3.0 milestone Nov 9, 2015
@awh awh closed this as completed in #1191 Jan 13, 2016
@awh awh added this to the 1.5.0 milestone Jan 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants