add proxy support for 'docker restart'

This commit is contained in:
Paul Bellamy committed 2015-05-19 10:34:46 +01:00
1 parent 2a120e5565
commit ca4b8e6f8e
2 files changed
+21 -1

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ func isCreateContainer(r *http.Request) bool {
}
func isStartContainer(r *http.Request) bool {
ok, err := regexp.MatchString("^/v[0-9\\.]*/containers/[^/]*/start$", r.URL.Path)
ok, err := regexp.MatchString("^/v[0-9\\.]*/containers/[^/]*/(re)?start$", r.URL.Path)
return err == nil && ok
}
+20
View File
@@ -0,0 +1,20 @@
#! /bin/bash
. ./config.sh
C1=10.2.0.78
C2=10.2.0.34
NAME=seetwo.weave.local
start_suite "Proxy restart reattaches networking to containers"
weave_on $HOST1 launch-dns 10.2.254.1/24
weave_on $HOST1 launch-proxy --with-dns
docker_proxy_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME gliderlabs/alpine /bin/sh
docker_proxy_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 aanand/docker-dnsutils /bin/sh
docker_proxy_on $HOST1 restart c2
assert_raises "exec_on $HOST1 c2 ip link show ethwe | grep 'state UP'"
assert_dns_record $HOST1 c1 $NAME $C2
end_suite