Merge branch '1.0'
Conflicts: proxy/create_exec_interceptor.go test/610_proxy_wait_for_weave_test.sh
This commit is contained in:
commit
4d887c8a55
2 files changed
+7
-1
No files matched your search
@@ -29,7 +29,9 @@ func (i *createExecInterceptor) InterceptRequest(r *http.Request) error {
|
|||||||
return err
|
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 {
|
||||||
Log.Infof("Exec in container %s with WEAVE_CIDR \"%s\"", container.ID, strings.Join(cidrs, " "))
|
Log.Infof("Exec in container %s with WEAVE_CIDR \"%s\"", container.ID, strings.Join(cidrs, " "))
|
||||||
cmd := append(weaveWaitEntrypoint, "-s")
|
cmd := append(weaveWaitEntrypoint, "-s")
|
||||||
options.Cmd = append(cmd, options.Cmd...)
|
options.Cmd = append(cmd, options.Cmd...)
|
||||||
|
|||||||
@@ -22,4 +22,8 @@ assert "entrypoint c2" "$(entrypoint $COMMITTED_IMAGE)"
|
|||||||
# Check weave IP is first ip returned, so java (etc) prefer weave.
|
# Check weave IP is first ip returned, so java (etc) prefer weave.
|
||||||
assert "proxy docker_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.1/24' $BASE_IMAGE hostname -i | cut -d' ' -f1" "10.2.1.1"
|
assert "proxy docker_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.1/24' $BASE_IMAGE hostname -i | cut -d' ' -f1" "10.2.1.1"
|
||||||
|
|
||||||
|
# Check exec works on containers without weavewait
|
||||||
|
docker_on $HOST1 run -dit --name c3 $SMALL_IMAGE /bin/sh
|
||||||
|
assert_raises "proxy docker_on $HOST1 exec c3 true"
|
||||||
|
|
||||||
end_suite
|
end_suite
|
||||||
Reference in new issue
Block a user