Use weave attach --or-die in proxy instead of killing it in the proxy.
This commit is contained in:
1 parent
ee4daf02b5
commit
fd5ac633d3
1 file changed
+1
-2
@@ -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, " "))
|
Info.Printf("Attaching container %s with WEAVE_CIDR \"%s\" to weave network", container.ID, strings.Join(cidrs, " "))
|
||||||
args := []string{"attach"}
|
args := []string{"attach"}
|
||||||
args = append(args, cidrs...)
|
args = append(args, cidrs...)
|
||||||
args = append(args, container.ID)
|
args = append(args, "--or-die", container.ID)
|
||||||
if output, err := callWeave(args...); err != nil {
|
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))
|
Warning.Printf("Attaching container %s to weave network failed: %s", container.ID, string(output))
|
||||||
return errors.New(string(output))
|
return errors.New(string(output))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user