Merge pull request #2249 from weaveworks/issues/2209-depersist-on-range-change

Better deleting of persisted IPAM data
This commit is contained in:
Adam Harrison committed 2016-05-05 10:11:22 +01:00
commit 1283ba4f61
3 files changed
+69 -29

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#! /bin/bash
. ./config.sh
start_suite "IPAM alloc range change"
weave_on $HOST1 launch --ipalloc-range 10.2.0.0/16
weave_on $HOST1 prime
weave_on $HOST1 stop
weave_on $HOST1 launch --ipalloc-range 10.3.0.0/16
# Ensure allocations can proceed
assert_raises "timeout 10 cat <( start_container $HOST1 )"
end_suite
+8
View File
@@ -19,4 +19,12 @@ weave_on $HOST2 connect $HOST1
assert_raises "exec_on $HOST1 c1 $PING c2"
assert_raises "exec_on $HOST2 c2 $PING c1"
# Now restart one router with a different peername
docker_on $HOST2 rm -f c2 >/dev/null
weave_on $HOST2 forget $HOST1
weave_on $HOST2 stop
weave_on $HOST2 launch --name ::3
# Check that this host has not retained the previous IPAM data
assert "weave_on $HOST2 status ipam" ""
end_suite