Remove attach-router since it no longer does anything
This commit is contained in:
1 parent
ae625a18c8
commit
f479e57870
2 files changed
+1
-24
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user