From 087d9489417119c23b43015e9dad4fcded184b11 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 30 Jun 2016 12:02:52 +0100 Subject: [PATCH 1/2] Check that weave router is running before launching plugin --- weave | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weave b/weave index 0887b3e2..a5da7089 100755 --- a/weave +++ b/weave @@ -1978,6 +1978,10 @@ EOF echo $PROXY_CONTAINER ;; launch-plugin) + if ! check_running $CONTAINER_NAME 2>/dev/null ; then + echo "ERROR:" $CONTAINER_NAME "container must be running before plugin can be launched" >&2 + exit 1 + fi launch_plugin_if_not_running "$@" echo $PLUGIN_CONTAINER ;; From 53b8c804f27f29a96889088911b1ff797c6ee3d4 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 1 Jul 2016 09:43:49 +0100 Subject: [PATCH 2/2] Launch the whole of weave to avoid tripping over plugin-only test --- test/090_docker_restart_policy_2_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/090_docker_restart_policy_2_test.sh b/test/090_docker_restart_policy_2_test.sh index f43428d4..63d63cf2 100755 --- a/test/090_docker_restart_policy_2_test.sh +++ b/test/090_docker_restart_policy_2_test.sh @@ -23,8 +23,8 @@ assert_raises "! check_restart $HOST1 weave" assert_raises "! check_restart $HOST1 weaveproxy" assert_raises "! check_restart $HOST1 weaveplugin" -# Relaunch the plugin to prevent the `weave stop` in `end_suite` +# Relaunch to prevent the `weave stop` in `end_suite` # timing out trying to remove the plugin network -weave_on $HOST1 launch-plugin +weave_on $HOST1 launch --no-restart end_suite