From 43249a8d3961c2bc5b7fb297760807ae894728cf Mon Sep 17 00:00:00 2001 From: Marc CARRE Date: Mon, 8 May 2017 20:04:41 +0100 Subject: [PATCH] Change all launch-*/stop-* commands to launch/stop. Given `proxy` & `router` processes have been merged, `launch-proxy`, `launch-router`, `stop-proxy`, `stop-router` do not make sense any more, and should just be `launch` and `stop` with the appropriate flags. --- bin/multiweave | 4 +-- test/120_discovery_3_test.sh | 6 ++--- test/150_connect_forget_2_test.sh | 6 ++--- test/195_no_multicast_route_1_test.sh | 7 +++-- test/215_stale_dns_3_test.sh | 10 ++++---- test/280_with_or_without_dns_test.sh | 2 +- test/290_dns_fallback_test.sh | 2 +- test/310_docker_restart_test.sh | 3 +-- test/320_claim_3_test.sh | 14 +++++----- test/330_reset_2_test.sh | 8 +++--- test/360_ipalloc_seed_mismatch_3_test.sh | 6 ++--- test/370_persist_ipam_2_test.sh | 2 +- test/390_peer_name_test.sh | 16 ++++++------ test/500_weave_multi_cidr_test.sh | 2 +- test/600_proxy_docker_py.sh | 2 +- test/605_proxy_inspect_test.sh | 3 +-- test/610_proxy_wait_for_weave_test.sh | 6 ++--- test/615_proxy_rewrite_hosts_test.sh | 6 ++--- test/620_proxy_entrypoint_command_test.sh | 6 ++--- test/630_proxy_dns_test.sh | 8 +++--- test/640_proxy_restart_reattaches_test.sh | 9 ++----- test/650_proxy_env_test.sh | 8 +++--- test/655_proxy_large_http_chunks_test.sh | 2 +- test/660_proxy_ipam_2_test.sh | 6 ++--- test/670_proxy_tls_test.sh | 3 +-- test/680_proxy_hostname_derivation_test.sh | 6 ++--- test/690_proxy_config_test.sh | 30 +++++++++++----------- test/695_proxy_failure_modes_test.sh | 2 +- test/810_plugin_router_restart_test.sh | 4 +-- test/830_cni_plugin_test.sh | 2 +- weave | 2 +- 31 files changed, 91 insertions(+), 102 deletions(-) diff --git a/bin/multiweave b/bin/multiweave index 40654b4c..995a5616 100755 --- a/bin/multiweave +++ b/bin/multiweave @@ -41,7 +41,7 @@ case "$1" in for i in $(seq $START $FINISH); do IP=$SUBNET.$i sudo ip addr add $IP/24 dev multiweave - weave $i launch-router --datapath '' --iface '' --no-dns --host $IP \ + weave $i launch --datapath '' --iface '' --no-dns --host $IP \ --name $(random_mac) --nickname weave$i "$@" done echo $(date -R) connecting @@ -57,7 +57,7 @@ case "$1" in for i in $(seq $FINISH -1 $START); do IP=$SUBNET.$i echo Stopping weave$i - weave $i stop-router + weave $i stop sudo ip addr del $IP/24 dev multiweave || true done [ -z "$(ip -4 -o addr show multiweave)" ] && sudo ip link del multiweave diff --git a/test/120_discovery_3_test.sh b/test/120_discovery_3_test.sh index 82f2e5d3..e0085ba2 100755 --- a/test/120_discovery_3_test.sh +++ b/test/120_discovery_3_test.sh @@ -6,9 +6,9 @@ C1=10.2.1.41 C3=10.2.1.71 launch_all() { - weave_on $HOST1 launch-router $1 - weave_on $HOST2 launch-router $1 --ipalloc-range="" $HOST1 - weave_on $HOST3 launch-router $1 $HOST2 + weave_on $HOST1 launch $1 + weave_on $HOST2 launch $1 --ipalloc-range="" $HOST1 + weave_on $HOST3 launch $1 $HOST2 } start_suite "Peer discovery, multi-hop routing and gossip forwarding" diff --git a/test/150_connect_forget_2_test.sh b/test/150_connect_forget_2_test.sh index 5c6616ef..40b7922c 100755 --- a/test/150_connect_forget_2_test.sh +++ b/test/150_connect_forget_2_test.sh @@ -16,8 +16,8 @@ assert_peers() { start_suite "Connecting and forgetting routers after launch" -weave_on $HOST1 launch-router -weave_on $HOST2 launch-router +weave_on $HOST1 launch +weave_on $HOST2 launch start_container $HOST1 $C1/24 --name=c1 start_container $HOST2 $C2/24 --name=c2 @@ -35,7 +35,7 @@ assert_raises "exec_on $HOST1 c1 $PING $C2" # Forget everyone and disconnect assert_raises "weave_on $HOST2 forget $HOST1 $HOST2" assert_raises "stop_weave_on $HOST1" -assert_raises "weave_on $HOST1 launch-router" +assert_raises "weave_on $HOST1 launch" assert_peers $HOST2 "" assert_raises "exec_on $HOST1 c1 sh -c '! $PING $C2'" diff --git a/test/195_no_multicast_route_1_test.sh b/test/195_no_multicast_route_1_test.sh index 2b057e1a..b4c1288c 100755 --- a/test/195_no_multicast_route_1_test.sh +++ b/test/195_no_multicast_route_1_test.sh @@ -12,8 +12,7 @@ start_suite "--no-multicast-route operation" $SSH $HOST1 docker network rm testmcasttrue testmcastfalse >/dev/null 2>&1 || true # Ensure containers run either way have no multicast route -weave_on $HOST1 launch-router --plugin -weave_on $HOST1 launch-proxy --no-multicast-route +weave_on $HOST1 launch --no-multicast-route docker_on $HOST1 run --name c1 -dt $SMALL_IMAGE /bin/sh weave_on $HOST1 attach --no-multicast-route c1 @@ -35,8 +34,8 @@ assert "show_multicast_route_on $HOST1 c5" "224.0.0.0/4 dev ethwe0 " # Ensure current proxy options are obeyed on container start docker_on $HOST1 stop -t 1 c2 -weave_on $HOST1 stop-proxy -weave_on $HOST1 launch-proxy +weave_on $HOST1 stop +weave_on $HOST1 launch proxy docker_on $HOST1 start c2 diff --git a/test/215_stale_dns_3_test.sh b/test/215_stale_dns_3_test.sh index d3e97749..bfabb390 100755 --- a/test/215_stale_dns_3_test.sh +++ b/test/215_stale_dns_3_test.sh @@ -4,9 +4,9 @@ start_suite "Check propagation of DNS entries when gossip is delayed" -weave_on $HOST1 launch-router --no-discovery -weave_on $HOST2 launch-router --no-discovery $HOST1 -weave_on $HOST3 launch-router --no-discovery $HOST2 +weave_on $HOST1 launch --no-discovery +weave_on $HOST2 launch --no-discovery $HOST1 +weave_on $HOST3 launch --no-discovery $HOST2 start_container $HOST1 --name=c1 C1=$(container_ip $HOST1 c1) @@ -17,10 +17,10 @@ assert_dns_record $HOST3 c3 c1.weave.local $C1 # Stall the propagation of gossip, stop weave and kill the container run_on $HOST3 "sudo iptables -A INPUT -s $HOST2 -j DROP" -weave_on $HOST1 stop-router +weave_on $HOST1 stop docker_on $HOST1 rm -f c1 -weave_on $HOST1 launch-router --no-discovery $HOST3 +weave_on $HOST1 launch --no-discovery $HOST3 # Now re-enable gossip from host2 to host3 run_on $HOST3 "sudo iptables -D INPUT -s $HOST2 -j DROP" diff --git a/test/280_with_or_without_dns_test.sh b/test/280_with_or_without_dns_test.sh index 206cfd81..7ba86452 100755 --- a/test/280_with_or_without_dns_test.sh +++ b/test/280_with_or_without_dns_test.sh @@ -22,7 +22,7 @@ check_dns() { start_suite "With or without DNS test" # Assert behaviour without weaveDNS running -weave_on $HOST1 launch-router +weave_on $HOST1 launch start_container $HOST1 $TARGET_IP/24 --name c2 -h $TARGET diff --git a/test/290_dns_fallback_test.sh b/test/290_dns_fallback_test.sh index 2161f155..b4730a12 100755 --- a/test/290_dns_fallback_test.sh +++ b/test/290_dns_fallback_test.sh @@ -4,7 +4,7 @@ start_suite "Resolve a non-weave address" -weave_on $HOST1 launch-router +weave_on $HOST1 launch start_container_with_dns $HOST1 10.2.1.5/24 --name=c1 diff --git a/test/310_docker_restart_test.sh b/test/310_docker_restart_test.sh index e2d255a3..25bf44e1 100755 --- a/test/310_docker_restart_test.sh +++ b/test/310_docker_restart_test.sh @@ -4,8 +4,7 @@ start_suite "Containers get same IP address on restart" -weave_on $HOST1 launch-router -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch # Use up first address with throwaway container start_container $HOST1 --name=c1 diff --git a/test/320_claim_3_test.sh b/test/320_claim_3_test.sh index 4c135ab6..f2e5e4d2 100755 --- a/test/320_claim_3_test.sh +++ b/test/320_claim_3_test.sh @@ -15,8 +15,8 @@ delete_persistence() { start_suite "Claiming addresses" -weave_on $HOST1 launch-router --ipalloc-range $UNIVERSE $HOST2 -weave_on $HOST2 launch-router --ipalloc-range $UNIVERSE $HOST1 +weave_on $HOST1 launch --ipalloc-range $UNIVERSE $HOST2 +weave_on $HOST2 launch --ipalloc-range $UNIVERSE $HOST1 start_container $HOST1 $C1/12 --name=c1 start_container $HOST2 --name=c2 @@ -29,8 +29,8 @@ stop_weave_on $HOST2 delete_persistence $HOST1 $HOST2 # Start hosts in reverse order so c1's address has to be claimed from host2 -weave_on $HOST2 launch-router --ipalloc-range $UNIVERSE -weave_on $HOST1 launch-router --ipalloc-range $UNIVERSE $HOST2 +weave_on $HOST2 launch --ipalloc-range $UNIVERSE +weave_on $HOST1 launch --ipalloc-range $UNIVERSE $HOST2 # Start another container on host2, so if it hasn't relinquished c1's # address it would give that out as the first available. @@ -48,13 +48,13 @@ delete_persistence $HOST1 $HOST2 # Now make host1 attempt to claim from host2, when host2 is stopped # the point being to check whether host1 will hang trying to talk to host2 -weave_on $HOST2 launch-router --ipalloc-range $UNIVERSE +weave_on $HOST2 launch --ipalloc-range $UNIVERSE weave_on $HOST2 prime # Introduce host3 to remember the IPAM CRDT when we stop host2 -weave_on $HOST3 launch-router --ipalloc-range $UNIVERSE $HOST2 +weave_on $HOST3 launch --ipalloc-range $UNIVERSE $HOST2 weave_on $HOST3 prime stop_weave_on $HOST2 -weave_on $HOST1 launch-router --ipalloc-range $UNIVERSE $HOST3 +weave_on $HOST1 launch --ipalloc-range $UNIVERSE $HOST3 stop_weave_on $HOST1 stop_weave_on $HOST3 diff --git a/test/330_reset_2_test.sh b/test/330_reset_2_test.sh index 89b8dc34..6b5b95c6 100755 --- a/test/330_reset_2_test.sh +++ b/test/330_reset_2_test.sh @@ -4,17 +4,17 @@ start_suite "Rolling restart with reset" -weave_on $HOST1 launch-router -weave_on $HOST2 launch-router $HOST1 +weave_on $HOST1 launch +weave_on $HOST2 launch $HOST1 start_container $HOST1 --name=c1 start_container $HOST2 --name=c2 # Now reset the routers so they should give their space away, and restart weave_on $HOST1 reset -weave_on $HOST1 launch-router $HOST2 +weave_on $HOST1 launch $HOST2 weave_on $HOST2 reset -weave_on $HOST2 launch-router $HOST1 +weave_on $HOST2 launch $HOST1 # And try to start a container assert_raises "timeout 10 cat <( start_container $HOST1 )" diff --git a/test/360_ipalloc_seed_mismatch_3_test.sh b/test/360_ipalloc_seed_mismatch_3_test.sh index c26a9d41..304aedc8 100755 --- a/test/360_ipalloc_seed_mismatch_3_test.sh +++ b/test/360_ipalloc_seed_mismatch_3_test.sh @@ -4,9 +4,9 @@ start_suite "IPAM ring seed mismatch" -weave_on $HOST1 launch-router --no-discovery -weave_on $HOST2 launch-router --no-discovery -weave_on $HOST3 launch-router --no-discovery +weave_on $HOST1 launch --no-discovery +weave_on $HOST2 launch --no-discovery +weave_on $HOST3 launch --no-discovery # Do some allocations to get the ring initialized on two hosts start_container $HOST1 diff --git a/test/370_persist_ipam_2_test.sh b/test/370_persist_ipam_2_test.sh index 0922bb1a..257665a1 100755 --- a/test/370_persist_ipam_2_test.sh +++ b/test/370_persist_ipam_2_test.sh @@ -7,7 +7,7 @@ start_suite "Checking persistence of IPAM" launch_router_with_db() { host=$1 shift - weave_on $host launch-router "$@" + weave_on $host launch "$@" } launch_router_with_db $HOST1 $HOST2 diff --git a/test/390_peer_name_test.sh b/test/390_peer_name_test.sh index ab97e3d9..5c521d3d 100755 --- a/test/390_peer_name_test.sh +++ b/test/390_peer_name_test.sh @@ -26,7 +26,7 @@ ORIG_MACHINE_ID=$($SSH $HOST1 cat /etc/machine-id) # Blank machine-id to begin, so peername will work the same as pre-1.9 $SSH $HOST1 sudo cp /dev/null /etc/machine-id -weave_on $HOST1 launch-router +weave_on $HOST1 launch weave_on $HOST1 prime PEERNAME1=$(get_peername) @@ -34,21 +34,21 @@ PEERNAME1=$(get_peername) echo $ORIG_MACHINE_ID | $SSH $HOST1 sudo tee /etc/machine-id >/dev/null # Stop and restart; it should take the ID from the bridge -weave_on $HOST1 stop-router -weave_on $HOST1 launch-router +weave_on $HOST1 stop +weave_on $HOST1 launch assert "get_peername" "$PEERNAME1" # Stop and remove the bridge, then restart; it should take the ID from persistence -weave_on $HOST1 stop-router +weave_on $HOST1 stop remove_bridge -weave_on $HOST1 launch-router +weave_on $HOST1 launch assert "get_peername" "$PEERNAME1" # Now remove everything and restart: should get a different peer name weave_on $HOST1 reset -weave_on $HOST1 launch-router +weave_on $HOST1 launch PEERNAME3=$(get_peername) assert_raises "[ $PEERNAME3 != $PEERNAME1 ]" @@ -57,9 +57,9 @@ assert_raises "[ $PEERNAME3 != $PEERNAME1 ]" echo $ORIG_MACHINE_ID | rot8 | $SSH $HOST1 sudo tee /etc/machine-id >/dev/null # Remove bridge and restart; it should get a different ID -weave_on $HOST1 stop-router +weave_on $HOST1 stop remove_bridge -weave_on $HOST1 launch-router +weave_on $HOST1 launch assert_raises "[ $(get_peername) != $PEERNAME3 ]" diff --git a/test/500_weave_multi_cidr_test.sh b/test/500_weave_multi_cidr_test.sh index fede384f..f4b5a02f 100755 --- a/test/500_weave_multi_cidr_test.sh +++ b/test/500_weave_multi_cidr_test.sh @@ -70,7 +70,7 @@ start_suite "Weave attach/detach/expose/hide with multiple cidr arguments" # specific address, i.e. we are assuming that IPAM always returns the # lowest available address in the subnet -weave_on $HOST1 launch-router --ipalloc-range 10.2.3.0/24 +weave_on $HOST1 launch --ipalloc-range 10.2.3.0/24 # Run container with three cidrs CID=$(docker_on $HOST1 run --name=multicidr -h $NAME -dt $SMALL_IMAGE /bin/sh) diff --git a/test/600_proxy_docker_py.sh b/test/600_proxy_docker_py.sh index 8e54f2c1..dee0c2b1 100755 --- a/test/600_proxy_docker_py.sh +++ b/test/600_proxy_docker_py.sh @@ -29,7 +29,7 @@ docker_py_test() { i=$(($i + 1)) done - weave_on $HOST1 launch-proxy --no-default-ipalloc + weave_on $HOST1 launch --no-default-ipalloc DOCKER_BRIDGE_IP=$(weave_on $HOST1 docker-bridge-ip) diff --git a/test/605_proxy_inspect_test.sh b/test/605_proxy_inspect_test.sh index 919a502a..0c7d44f9 100755 --- a/test/605_proxy_inspect_test.sh +++ b/test/605_proxy_inspect_test.sh @@ -4,8 +4,7 @@ start_suite "Check that docker inspect returns the weave IP" -weave_on $HOST1 launch-router -weave_on $HOST1 launch-proxy --rewrite-inspect +weave_on $HOST1 launch --rewrite-inspect proxy docker_on $HOST1 run -dt --name c1 $SMALL_IMAGE /bin/sh inspect_format="{{.Name}} {{.NetworkSettings.MacAddress}} {{.NetworkSettings.IPAddress}}/{{.NetworkSettings.IPPrefixLen}}" diff --git a/test/610_proxy_wait_for_weave_test.sh b/test/610_proxy_wait_for_weave_test.sh index d372474d..8a57f941 100755 --- a/test/610_proxy_wait_for_weave_test.sh +++ b/test/610_proxy_wait_for_weave_test.sh @@ -18,10 +18,10 @@ BASE_IMAGE=busybox ! docker_on $HOST1 inspect --format=" " $BASE_IMAGE >/dev/null 2>&1 || docker_on $HOST1 rmi $BASE_IMAGE # check that interface is ready, with and without --no-multicast-route -weave_on $HOST1 launch-proxy --no-multicast-route +weave_on $HOST1 launch --no-multicast-route check_iface_ready 10.2.1.1/24 -weave_on $HOST1 stop-proxy -weave_on $HOST1 launch-proxy +weave_on $HOST1 stop +weave_on $HOST1 launch check_iface_ready 10.2.1.1/24 # Check committed containers only have one weavewait prepended diff --git a/test/615_proxy_rewrite_hosts_test.sh b/test/615_proxy_rewrite_hosts_test.sh index a8629aab..eefd1ba2 100755 --- a/test/615_proxy_rewrite_hosts_test.sh +++ b/test/615_proxy_rewrite_hosts_test.sh @@ -11,7 +11,7 @@ image_ip() { start_suite "Proxy rewrites hosts file" # Default rewrites the host file -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch assert "image_ip $SMALL_IMAGE" $expected_ip # When container user is non-root @@ -25,8 +25,8 @@ EOF assert "image_ip non-root" $expected_ip # When rewrite hosts is disabled -weave_on $HOST1 stop-proxy -weave_on $HOST1 launch-proxy --no-rewrite-hosts +weave_on $HOST1 stop +weave_on $HOST1 launch --no-rewrite-hosts assert_raises "image_ip $SMALL_IMAGE | grep -v $expected_ip" end_suite diff --git a/test/620_proxy_entrypoint_command_test.sh b/test/620_proxy_entrypoint_command_test.sh index 748c415a..38f26e74 100755 --- a/test/620_proxy_entrypoint_command_test.sh +++ b/test/620_proxy_entrypoint_command_test.sh @@ -15,7 +15,7 @@ run_container() { } start_suite "Proxy uses correct entrypoint and command with weavewait" -weave_on $HOST1 launch-proxy --no-restart +weave_on $HOST1 launch --no-restart build_image check-ethwe-up '["grep"]' '["^1$", "/sys/class/net/ethwe/carrier"]' run_container "check-ethwe-up" @@ -26,13 +26,13 @@ run_container "grep ^1$ /sys/class/net/ethwe/carrier" build_image false '["/bin/false"]' '' run_container "--entrypoint='grep' false ^1$ /sys/class/net/ethwe/carrier" -weave_on $HOST1 launch-router --ipalloc-range 10.2.2.0/24 +weave_on $HOST1 launch --ipalloc-range 10.2.2.0/24 # NOTE: docker-kill hangs (https://github.com/docker/docker/issues/31447), so we # kill directly the weaveproxy process instead. WEAVEPROXY_PID=$(container_pid $HOST1 weaveproxy) $SSH $HOST1 "ps aux | grep weaveproxy" run_on $HOST1 "sudo kill -9 $WEAVEPROXY_PID" -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch assert_raises "proxy docker_on $HOST1 run check-ethwe-up" diff --git a/test/630_proxy_dns_test.sh b/test/630_proxy_dns_test.sh index a9031afb..dc04442b 100755 --- a/test/630_proxy_dns_test.sh +++ b/test/630_proxy_dns_test.sh @@ -24,16 +24,16 @@ start_suite "Proxy registers containers with dns" bridge_ip=$(weave_on $HOST1 docker-bridge-ip) # Assert behaviour without weaveDNS -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch do_assert_resolution assert_no_dns_record # Assert behaviour with weaveDNS running -weave_on $HOST1 launch-router +weave_on $HOST1 launch do_assert_resolution assert_dns_record -weave_on $HOST1 stop-proxy +weave_on $HOST1 stop # Assert behaviour with weaveDNS running, but dns forced off -weave_on $HOST1 launch-proxy --without-dns +weave_on $HOST1 launch --without-dns do_assert_resolution assert_no_dns_record end_suite diff --git a/test/640_proxy_restart_reattaches_test.sh b/test/640_proxy_restart_reattaches_test.sh index 9c99a082..22c30929 100755 --- a/test/640_proxy_restart_reattaches_test.sh +++ b/test/640_proxy_restart_reattaches_test.sh @@ -49,14 +49,9 @@ assert_raises "timeout 90 cat <( run_many )" # Start a container that needs IPAM, then restart it when the router is stopped proxy_start_container $HOST1 -di --name=c3 --restart=always wait_for_attached $HOST1 c3 -weave_on $HOST1 stop-router -docker_on $HOST1 restart c3 -weave_on $HOST1 launch-router -wait_for_attached $HOST1 c3 - -# Restarting proxy shouldn't kill unattachable containers weave_on $HOST1 stop -weave_on $HOST1 launch-proxy +docker_on $HOST1 restart c3 +weave_on $HOST1 launch wait_for_attached $HOST1 c3 end_suite diff --git a/test/650_proxy_env_test.sh b/test/650_proxy_env_test.sh index 53969180..0fee49af 100755 --- a/test/650_proxy_env_test.sh +++ b/test/650_proxy_env_test.sh @@ -15,22 +15,22 @@ start_suite "Configure the docker daemon for the proxy" assert "weave_on $HOST1 env" "" assert "weave_on $HOST1 config" "" -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch check # Check we can use the weave script through the proxy assert_raises "eval '$(weave_on $HOST1 env)' ; $WEAVE version" assert_raises "eval '$(weave_on $HOST1 env)' ; $WEAVE ps" -assert_raises "eval '$(weave_on $HOST1 env)' ; $WEAVE launch-router" +assert_raises "eval '$(weave_on $HOST1 env)' ; $WEAVE launch" # Check we can use weave env/config with multiple -Hs specified weave_on $HOST1 stop -weave_on $HOST1 launch-proxy -H tcp://0.0.0.0:12375 -H unix:///var/run/weave/weave.sock +weave_on $HOST1 launch -H tcp://0.0.0.0:12375 -H unix:///var/run/weave/weave.sock check # Check we can use weave env/config with unix -Hs specified weave_on $HOST1 stop -weave_on $HOST1 launch-proxy -H unix:///var/run/weave/weave.sock +weave_on $HOST1 launch -H unix:///var/run/weave/weave.sock assert_raises "run_on $HOST1 'eval \$(weave env) ; docker $CMD'" assert_raises "run_on $HOST1 'docker \$(weave config) $CMD'" diff --git a/test/655_proxy_large_http_chunks_test.sh b/test/655_proxy_large_http_chunks_test.sh index ca540acb..a51006ae 100755 --- a/test/655_proxy_large_http_chunks_test.sh +++ b/test/655_proxy_large_http_chunks_test.sh @@ -17,7 +17,7 @@ done # Sanity-check that it's big enough to cause issues. assert_raises "test $(curl -s http://$HOST1:$DOCKER_PORT/v1.19/images/json?all=true | wc -c) -gt 65536" -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch assert_raises "proxy docker_on $HOST1 images -a" diff --git a/test/660_proxy_ipam_2_test.sh b/test/660_proxy_ipam_2_test.sh index 5d80871d..ef57a49e 100755 --- a/test/660_proxy_ipam_2_test.sh +++ b/test/660_proxy_ipam_2_test.sh @@ -11,10 +11,8 @@ assert_no_ethwe() { start_suite "Ping proxied containers over cross-host weave network (with IPAM)" -weave_on $HOST1 launch-router --ipalloc-range $UNIVERSE -weave_on $HOST2 launch-router --ipalloc-range $UNIVERSE $HOST1 -weave_on $HOST1 launch-proxy -weave_on $HOST2 launch-proxy --no-default-ipalloc +weave_on $HOST1 launch --ipalloc-range $UNIVERSE +weave_on $HOST2 launch --ipalloc-range --no-default-ipalloc $UNIVERSE $HOST1 proxy_start_container $HOST1 --name=auto proxy_start_container $HOST1 --name=none -e WEAVE_CIDR=none diff --git a/test/670_proxy_tls_test.sh b/test/670_proxy_tls_test.sh index 470dc8d9..afc941d3 100755 --- a/test/670_proxy_tls_test.sh +++ b/test/670_proxy_tls_test.sh @@ -6,8 +6,7 @@ start_suite "Boot the proxy with TLS-enabled Docker support" PWD=$($SSH $HOST1 pwd) -weave_on $HOST1 launch-router -weave_on $HOST1 launch-proxy \ +weave_on $HOST1 launch \ --tlsverify \ --tlscacert $PWD/tls/ca.pem \ --tlscert $PWD/tls/$HOST1.pem \ diff --git a/test/680_proxy_hostname_derivation_test.sh b/test/680_proxy_hostname_derivation_test.sh index e1729511..561baf1f 100755 --- a/test/680_proxy_hostname_derivation_test.sh +++ b/test/680_proxy_hostname_derivation_test.sh @@ -33,17 +33,17 @@ check_dns_records() { } test_setup() { - weave_on $HOST1 launch-proxy $@ + weave_on $HOST1 launch $@ } test_cleanup() { - weave_on $HOST1 stop-proxy + weave_on $HOST1 stop } start_suite "Hostname derivation" -weave_on $HOST1 launch-router +weave_on $HOST1 launch # Hostname derivation through container name substitutions test_setup --hostname-match '^[^-]+-(?P[^-]*)-[^-]+$' --hostname-replacement '$appname' diff --git a/test/690_proxy_config_test.sh b/test/690_proxy_config_test.sh index 8797e3f8..cac1073c 100755 --- a/test/690_proxy_config_test.sh +++ b/test/690_proxy_config_test.sh @@ -2,45 +2,45 @@ . "$(dirname "$0")/config.sh" -start_suite "Various launch-proxy configurations" +start_suite "Various proxy configurations" # Booting it over unix socket listens on unix socket -run_on $HOST1 COVERAGE=$COVERAGE weave launch-proxy +run_on $HOST1 COVERAGE=$COVERAGE weave launch assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps" assert_raises "proxy docker_on $HOST1 ps" 1 -weave_on $HOST1 stop-proxy +weave_on $HOST1 stop # Booting it over tcp listens on tcp -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps" 1 assert_raises "proxy docker_on $HOST1 ps" -weave_on $HOST1 stop-proxy +weave_on $HOST1 stop # Booting it over tcp (no prefix) listens on tcp -DOCKER_HOST=tcp://$HOST1:$DOCKER_PORT $WEAVE launch-proxy +DOCKER_HOST=tcp://$HOST1:$DOCKER_PORT $WEAVE launch assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps" 1 assert_raises "proxy docker_on $HOST1 ps" -weave_on $HOST1 stop-proxy +weave_on $HOST1 stop # Booting it with -H outside /var/run/weave, still works socket="$($SSH $HOST1 mktemp -d)/weave.sock" -weave_on $HOST1 launch-proxy -H unix://$socket +weave_on $HOST1 launch -H unix://$socket assert_raises "run_on $HOST1 sudo docker -H unix:///$socket ps" 0 -weave_on $HOST1 stop-proxy +weave_on $HOST1 stop # Booting it against non-standard docker unix sock -run_on $HOST1 "DOCKER_HOST=unix:///var/run/alt-docker.sock COVERAGE=$COVERAGE weave launch-proxy -H tcp://0.0.0.0:12375" +run_on $HOST1 "DOCKER_HOST=unix:///var/run/alt-docker.sock COVERAGE=$COVERAGE weave launch -H tcp://0.0.0.0:12375" assert_raises "proxy docker_on $HOST1 ps" -weave_on $HOST1 stop-proxy +weave_on $HOST1 stop # Booting it over tls errors -assert_raises "! DOCKER_CLIENT_ARGS='--tls' weave_on $HOST1 launch-proxy" -assert_raises "! DOCKER_CERT_PATH='./tls' DOCKER_TLS_VERIFY=1 weave_on $HOST1 launch-proxy" +assert_raises "! DOCKER_CLIENT_ARGS='--tls' weave_on $HOST1 launch" +assert_raises "! DOCKER_CERT_PATH='./tls' DOCKER_TLS_VERIFY=1 weave_on $HOST1 launch" # Booting it with a specific -H overrides defaults -weave_on $HOST1 launch-proxy -H tcp://0.0.0.0:12345 +weave_on $HOST1 launch -H tcp://0.0.0.0:12345 assert_raises "run_on $HOST1 sudo docker -H tcp://$HOST1:12345 ps" assert_raises "proxy docker_on $HOST1 ps" 1 -weave_on $HOST1 stop-proxy +weave_on $HOST1 stop end_suite diff --git a/test/695_proxy_failure_modes_test.sh b/test/695_proxy_failure_modes_test.sh index 56c5e953..66df5245 100755 --- a/test/695_proxy_failure_modes_test.sh +++ b/test/695_proxy_failure_modes_test.sh @@ -5,7 +5,7 @@ start_suite "Proxy failure modes" # docker run should fail when weave router is not running -weave_on $HOST1 launch-proxy +weave_on $HOST1 launch assert_raises "! proxy docker_on $HOST1 run --rm $SMALL_IMAGE true" assert_raises "proxy docker_on $HOST1 run --rm $SMALL_IMAGE true 2>&1 1>/dev/null | grep 'Error response from daemon: weave container is not present. Have you launched it?'" diff --git a/test/810_plugin_router_restart_test.sh b/test/810_plugin_router_restart_test.sh index 48ee230a..0c54f6b1 100755 --- a/test/810_plugin_router_restart_test.sh +++ b/test/810_plugin_router_restart_test.sh @@ -10,8 +10,8 @@ weave_on $HOST1 launch start_container_local_plugin $HOST1 --name=c1 --hostname=$C1_NAME c1ip=$(container_ip $HOST1 c1) -weave_on $HOST1 stop-router -weave_on $HOST1 launch-router +weave_on $HOST1 stop +weave_on $HOST1 launch assert "container_ip $HOST1 c1" "$c1ip" assert "weave_on $HOST1 dns-lookup $C1_NAME" "$c1ip" diff --git a/test/830_cni_plugin_test.sh b/test/830_cni_plugin_test.sh index dd6dc7fd..92a0bc1c 100755 --- a/test/830_cni_plugin_test.sh +++ b/test/830_cni_plugin_test.sh @@ -90,7 +90,7 @@ assert_raises "exec_on $HOST1 c1 $PING $C3IP" stop_weave_on $HOST1 # Ensure no warning is printed to the standard error: -ACTUAL_OUTPUT=$(CHECKPOINT_DISABLE="$CHECKPOINT_DISABLE" DOCKER_HOST=tcp://$HOST1:$DOCKER_PORT $WEAVE launch-router 2>&1) +ACTUAL_OUTPUT=$(CHECKPOINT_DISABLE="$CHECKPOINT_DISABLE" DOCKER_HOST=tcp://$HOST1:$DOCKER_PORT $WEAVE launch 2>&1) EXPECTED_OUTPUT=$($SSH $HOST1 docker inspect --format="{{.Id}}" weave) assert_raises "[ $EXPECTED_OUTPUT == $ACTUAL_OUTPUT ]" diff --git a/weave b/weave index fce1dc43..dce12232 100755 --- a/weave +++ b/weave @@ -126,7 +126,7 @@ docker_run_options() { exec_options() { case "$1" in - setup|setup-cni|launch|launch-router) + setup|setup-cni|launch) echo -v /:/host -e HOST_ROOT=/host ;; # All the other commands that may create the bridge and need machine id files.