Merge pull request #2155 from weaveworks/issues/2065-rationalise-ipam-concepts
Rationalise IPAM concepts
This commit is contained in:
commit
02516361c7
11 files changed
+123
-81
No files matched your search
@@ -9,9 +9,9 @@ weave_on $HOST1 launch
|
||||
PEER1=$(weave_on $HOST1 report -f '{{.Router.Name}}')
|
||||
start_container $HOST1
|
||||
weave_on $HOST2 launch $HOST1
|
||||
weave_on $HOST2 consense
|
||||
weave_on $HOST2 prime
|
||||
weave_on $HOST3 launch $HOST1
|
||||
weave_on $HOST3 consense
|
||||
weave_on $HOST3 prime
|
||||
|
||||
# nuke 1st peer
|
||||
docker_on $HOST1 kill weave
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
start_suite "Observers can't vote"
|
||||
|
||||
# Start network that doesn't have enough peers for consensus
|
||||
weave_on $HOST1 launch --init-peer-count=2
|
||||
weave_on $HOST2 launch --observer $HOST1
|
||||
weave_on $HOST1 launch --ipalloc-init consensus=2
|
||||
weave_on $HOST2 launch --ipalloc-init observer $HOST1
|
||||
|
||||
# Check that an allocation times out
|
||||
assert_raises "timeout 2 cat <( start_container $HOST1 )" 124
|
||||
|
||||
# Add another elector
|
||||
weave_on $HOST3 launch --init-peer-count=2 $HOST2
|
||||
weave_on $HOST3 launch --ipalloc-init consensus=2 $HOST2
|
||||
|
||||
# Check allocation succeeds
|
||||
assert_raises "timeout 10 cat <( start_container $HOST1 )"
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
start_suite "Observers can call election"
|
||||
|
||||
# Start network with sufficient voters for consensus
|
||||
weave_on $HOST1 launch --init-peer-count=2
|
||||
weave_on $HOST2 launch --init-peer-count=2 $HOST1
|
||||
weave_on $HOST1 launch --ipalloc-init consensus=2
|
||||
weave_on $HOST2 launch --ipalloc-init consensus=2 $HOST1
|
||||
|
||||
# Add an observer
|
||||
weave_on $HOST3 launch --observer $HOST2
|
||||
weave_on $HOST3 launch --ipalloc-init observer $HOST2
|
||||
|
||||
# Wait for network to settle; ensure IPAM is idle (blank output = no consensus)
|
||||
sleep 5
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
start_suite "Specify initial IPAM seed"
|
||||
|
||||
# Launch two disconnected routers
|
||||
weave_on $HOST1 launch --name ::1 --ipam-seed ::1,::2
|
||||
weave_on $HOST2 launch --name ::2 --ipam-seed ::1,::2
|
||||
weave_on $HOST1 launch --name ::1 --ipalloc-init seed=::1,::2
|
||||
weave_on $HOST2 launch --name ::2 --ipalloc-init seed=::1,::2
|
||||
|
||||
# Ensure allocations can proceed
|
||||
assert_raises "timeout 10 cat <( start_container $HOST1 --name c1)"
|
||||
|
||||
@@ -11,7 +11,7 @@ check() {
|
||||
|
||||
start_suite "'detach' and 'hide' do not require IP allocation"
|
||||
|
||||
weave_on $HOST1 launch --ipalloc-range $UNIVERSE --init-peer-count=2
|
||||
weave_on $HOST1 launch --ipalloc-range $UNIVERSE --ipalloc-init consensus=2
|
||||
|
||||
start_container $HOST1 10.2.1.1/24 --name=c1
|
||||
check detach 10.2.1.1/24 c1
|
||||
|
||||
Reference in new issue
Block a user