From 80aa60b3ab0f5793e945073bfd25a478647a88b3 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 5 Apr 2015 17:04:43 +0100 Subject: [PATCH] separate multiweave 'launch' and 'connect' phases --- bin/multiweave | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/multiweave b/bin/multiweave index a65bc40e..65855621 100755 --- a/bin/multiweave +++ b/bin/multiweave @@ -7,15 +7,20 @@ FINISH=$((START+COUNT-1)) case "$1" in launch) + for i in $(seq $START $FINISH); do + WEAVE_CONTAINER_NAME=weave$i ./weave --local test-launch --connlimit=100 + done if [ $START -ne 1 ] ; then status=$(docker inspect --format='{{.State.Running}} {{.NetworkSettings.IPAddress}}' weave$((START-1))) PREV="${status#true }" fi for i in $(seq $START $FINISH); do - ID=$(WEAVE_CONTAINER_NAME=weave$i ./weave --local test-launch --connlimit=100 $PREV) - status=$(docker inspect --format='{{.State.Running}} {{.NetworkSettings.IPAddress}}' $ID) + if [ -n "$PREV" ] ; then + echo connecting weave$i to $PREV + WEAVE_CONTAINER_NAME=weave$i ./weave --local connect $PREV + fi + status=$(docker inspect --format='{{.State.Running}} {{.NetworkSettings.IPAddress}}' weave$i) PREV="${status#true }" - echo $ID $PREV done ;; stop)