[proxy] should not attempt weavewait in on weave container's execs

This commit is contained in:
Paul Bellamy committed 2015-07-15 16:14:14 +01:00
1 parent b476bd2afe
commit e4422205e8
2 files changed
+7 -1

No files matched your search

+3 -1
View File
@@ -29,7 +29,9 @@ func (i *createExecInterceptor) InterceptRequest(r *http.Request) error {
return err
}
if cidrs, ok := i.proxy.weaveCIDRsFromConfig(container.Config); ok {
_, hasWeaveWait := container.Volumes["/w"]
cidrs, hasCIDRs := i.proxy.weaveCIDRsFromConfig(container.Config)
if hasCIDRs && hasWeaveWait {
Info.Printf("Exec in container %s with WEAVE_CIDR \"%s\"", container.ID, strings.Join(cidrs, " "))
cmd := append(weaveWaitEntrypoint, "-s")
options.Cmd = append(cmd, options.Cmd...)