Use weave attach --or-die in proxy instead of killing it in the proxy.

This commit is contained in:
Bryan Boreham committed 2015-06-16 16:05:41 +01:00
1 parent ee4daf02b5
commit fd5ac633d3
1 file changed
+1 -2
+1 -2
View File
@@ -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))
}