-
Notifications
You must be signed in to change notification settings - Fork 673
make proxy attach network on docker start event #1210
Conversation
84b4e9a
to
2439ce4
Compare
2439ce4
to
376b45e
Compare
This change has a side-effect that |
Presumably the container is running; just not the application process. Still i can imagine that might trip up some users. And the same is true of |
...and The question is what might break for users. |
It sometimes breaks smoke-tests like 680. I made a fix. |
427e5e1
to
e9818d5
Compare
90b61c8
to
a4b0186
Compare
@@ -26,6 +26,11 @@ func main() { | |||
args = args[1:] | |||
} | |||
|
|||
if len(args) > 0 && args[0] == "-c" { // tell pid 1 to continue | |||
checkErr(syscall.Kill(1, syscall.SIGUSR2)) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
if err != nil { | ||
return nil, err | ||
} | ||
p.client = client | ||
p.client = client.Client | ||
client.AddObserver(p) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@paulbellamy if you have a minute, may be you could cherry-pick |
c3c669e
to
79b40ce
Compare
HOSTS_PATH=$(docker $DOCKER_CLIENT_ARGS run --rm --net=none \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
--entrypoint /bin/sh \ | ||
$EXEC_IMAGE -c 'docker inspect -f {{.HostsPath}} $(hostname)') |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
f814287
to
5427bdd
Compare
# Restart docker itself | ||
# - disabled since the commands are different between our Vagrant VMs and GCE | ||
#run_on $HOST1 sudo systemctl restart docker # for systemd | ||
#run_on $HOST1 sudo service docker restart # for upstart |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
2f1216b
to
165373d
Compare
I have addressed the two most recent review comments, rebased, and commented out the part of the test that will fail until #1209 is addressed. |
LGTM |
The plan of record is that we're waiting for #1314 before merging this. |
165373d
to
9fbb578
Compare
…restart commands. This means it also works when the docker daemon restarts a container.
9fbb578
to
1e23443
Compare
Have rebased and adjusted following merge of #1314 |
|
||
func (proxy *Proxy) waitForStart(r *http.Request) { | ||
var ch chan struct{} | ||
proxy.Lock() |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
make proxy attach network on docker start event
Do network attach on docker event rather than intercepting start and restart commands.
This means it also works when the docker daemon restarts a container. Fixes #401 and #1258.