Merge pull request #1191 from weaveworks/1047-same-ip-on-restart

Don't delete record of IP allocation immediately after container death
This commit is contained in:
Adam Harrison committed 2016-01-13 09:46:12 +00:00
commit 29ebeeaff5
13 files changed
+168 -55

No files matched your search

+27
View File
@@ -157,6 +157,33 @@ connect to. The individual IP addresses given to containers must, of
course, be unique - if you pick an address that the automatic
allocator has already assigned you will receive a warning.
If you restart a container, it will retain the same IP addresses on
the weave network:
host1$ docker run --name a1 -tdi ubuntu
f76b09a9fcfee04551dbb8d951d9a83e7e7d55126b02fd9f44f9f8a5f07d7c96
host1$ weave ps a1
a1 1e:dc:2a:db:ef:ff 10.32.0.3/12
host1$ docker restart a1
host1$ weave ps a1
a1 16:c0:6f:5d:c5:73 10.32.0.3/12
It works the same if you stop and immediately restart:
host1$ docker stop a1
host1$ docker start a1
However, additional addresses added with the `weave attach` command
will not be retained.
There is also a `weave restart` command, which does re-attach all
current IP addresses:
host1$ weave restart b1
(note that the IP addresses are held for a limited time - currently
30 seconds)
### <a name="naming-and-discovery"></a>Naming and discovery
Named containers are automatically registered in