From 48e9c53dda08d4c8c0477005b658b80a372c161d Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 18 May 2015 12:06:06 +0100 Subject: [PATCH 1/2] Fetch an address from IPAM for 'weave --local run' --- weave | 1 + 1 file changed, 1 insertion(+) diff --git a/weave b/weave index d46c8486..7cbfd0c8 100755 --- a/weave +++ b/weave @@ -850,6 +850,7 @@ case "$COMMAND" in shift $CIDR_COUNT CONTAINER=$(docker run $DNS_ARGS -d "$@") create_bridge + get_ipam_cidr $CONTAINER_ID $CONTAINER with_container_netns $CONTAINER attach $CIDR_ARGS >/dev/null tell_dns PUT $CONTAINER $CIDR_ARGS echo $CONTAINER From 5cc30364982e42ce22266f79374b7ed338ff4373 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 18 May 2015 13:03:02 +0100 Subject: [PATCH 2/2] Extend smoke test for 'weave run --local' to include IPAM --- test/400_weave_local_test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/400_weave_local_test.sh b/test/400_weave_local_test.sh index 286f986f..c4f9eab4 100755 --- a/test/400_weave_local_test.sh +++ b/test/400_weave_local_test.sh @@ -6,10 +6,13 @@ start_suite "Run weave with --local" 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" 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" +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