Merge pull request #686 from bboreham/672-ipam-run-local
Fetch an address from IPAM for 'weave --local run' Fixes #672.
This commit is contained in:
commit
fd0282ee05
2 files changed
+5
-1
No files matched your search
@@ -6,10 +6,13 @@ start_suite "Run weave with --local"
|
|||||||
|
|
||||||
run_on $HOST1 sudo ./weave --local reset
|
run_on $HOST1 sudo ./weave --local reset
|
||||||
|
|
||||||
run_on $HOST1 sudo ./weave --local launch
|
run_on $HOST1 sudo ./weave --local launch -iprange 10.2.5.0/24
|
||||||
assert_raises "docker_on $HOST1 ps | grep weave"
|
assert_raises "docker_on $HOST1 ps | grep weave"
|
||||||
|
|
||||||
run_on $HOST1 sudo ./weave --local run 10.2.6.5/24 -ti --name=c1 gliderlabs/alpine /bin/sh
|
run_on $HOST1 sudo ./weave --local run 10.2.6.5/24 -ti --name=c1 gliderlabs/alpine /bin/sh
|
||||||
assert_raises "exec_on $HOST1 c1 ifconfig | grep ethwe"
|
assert_raises "exec_on $HOST1 c1 ifconfig | grep ethwe"
|
||||||
|
|
||||||
|
run_on $HOST1 sudo ./weave --local run -ti --name=c2 gliderlabs/alpine /bin/sh
|
||||||
|
assert_raises "exec_on $HOST1 c2 ifconfig | grep ethwe"
|
||||||
|
|
||||||
end_suite
|
end_suite
|
||||||
@@ -850,6 +850,7 @@ case "$COMMAND" in
|
|||||||
shift $CIDR_COUNT
|
shift $CIDR_COUNT
|
||||||
CONTAINER=$(docker run $DNS_ARGS -d "$@")
|
CONTAINER=$(docker run $DNS_ARGS -d "$@")
|
||||||
create_bridge
|
create_bridge
|
||||||
|
get_ipam_cidr $CONTAINER_ID $CONTAINER
|
||||||
with_container_netns $CONTAINER attach $CIDR_ARGS >/dev/null
|
with_container_netns $CONTAINER attach $CIDR_ARGS >/dev/null
|
||||||
tell_dns PUT $CONTAINER $CIDR_ARGS
|
tell_dns PUT $CONTAINER $CIDR_ARGS
|
||||||
echo $CONTAINER
|
echo $CONTAINER
|
||||||
|
|||||||
Reference in new issue
Block a user