From fd5ac633d351f5753bdcbff4c3c61f645a621fea Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 16 Jun 2015 16:05:41 +0100 Subject: [PATCH] Use `weave attach --or-die` in proxy instead of killing it in the proxy. --- proxy/start_container_interceptor.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxy/start_container_interceptor.go b/proxy/start_container_interceptor.go index 5ac2fdd2..774e3104 100644 --- a/proxy/start_container_interceptor.go +++ b/proxy/start_container_interceptor.go @@ -29,9 +29,8 @@ func (i *startContainerInterceptor) InterceptResponse(r *http.Response) error { Info.Printf("Attaching container %s with WEAVE_CIDR \"%s\" to weave network", container.ID, strings.Join(cidrs, " ")) args := []string{"attach"} args = append(args, cidrs...) - args = append(args, container.ID) + args = append(args, "--or-die", container.ID) if output, err := callWeave(args...); err != nil { - i.proxy.client.KillContainer(docker.KillContainerOptions{ID: container.ID}) Warning.Printf("Attaching container %s to weave network failed: %s", container.ID, string(output)) return errors.New(string(output)) }