diff --git a/proxy/proxy.go b/proxy/proxy.go index e753ae26..40e00968 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -408,11 +408,6 @@ func containerShouldAttach(container *docker.Container) bool { return len(container.Config.Entrypoint) > 0 && container.Config.Entrypoint[0] == weaveWaitEntrypoint[0] } -func containerIsWeaveRouter(container *docker.Container) bool { - return container.Name == weaveContainerName && - len(container.Config.Entrypoint) > 0 && container.Config.Entrypoint[0] == weaveEntrypoint -} - func (proxy *Proxy) createWait(r *http.Request, ident string) { proxy.Lock() proxy.waiters[r] = &wait{ident: ident, ch: make(chan error, 1)} @@ -489,10 +484,6 @@ func (proxy *Proxy) attach(containerID string) error { } return nil } - if containerIsWeaveRouter(container) { - Log.Infof("Attaching weave router container: %s", container.ID) - return callWeaveAttach(container, []string{"attach-router"}) - } if !containerShouldAttach(container) || !container.State.Running { return nil } diff --git a/weave b/weave index f483188d..87086842 100755 --- a/weave +++ b/weave @@ -136,7 +136,7 @@ exec_options() { ;; # All the other commands that may create the bridge and need machine id files. # We don't mount '/' to avoid recursive mounts of '/var' - create-bridge|attach-router|attach|expose|hide) + create-bridge|attach|expose|hide) echo -v /etc:/host/etc -v /var/lib/dbus:/host/var/lib/dbus -e HOST_ROOT=/host ;; esac @@ -1417,12 +1417,6 @@ launch_router() { fi } -# Recreate the parameter values that are set when the router is first launched -fetch_router_args() { - CONTAINER_ARGS=$(docker inspect -f '{{.Args}}' $CONTAINER_NAME) || return 1 - NO_DNS_OPT=$(echo $CONTAINER_ARGS | grep -o -e '--no-dns') || true -} - stop_router() { ! is_plugin_v1_enabled || util_op remove-plugin-network weave || true stop $CONTAINER_NAME "Weave" @@ -1640,14 +1634,6 @@ EOF launch_router "$@" echo $ROUTER_CONTAINER ;; - attach-router) - check_running $CONTAINER_NAME - enforce_docker_bridge_addr_assign_type - # We cannot use detect_awsvpc here, because HTTP server might not be started - ! docker inspect -f '{{.Config.Cmd}}' $CONTAINER_NAME | grep -q -- "--awsvpc" || AWSVPC=1 - fetch_router_args - wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR - ;; launch-proxy) deprecation_warnings "$@" check_not_running proxy $PROXY_CONTAINER_NAME $BASE_EXEC_IMAGE