1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api
Brandon Philips 8d2226b7e5 fix(api): serve until the "acceptconnections" job
This fixes a bug that I encountered when using socket activation with
docker 0.8.1. When running the first `docker run` it would return:
"create: command not found".

The root cause was the socket activation code path was starting to
listen before the "initserver" job had finished. This meant that the
"create" handler hand't been registered yet leading to the command not
found error.

In log format it looks like this:

```
[/var/lib/docker|9d2e78e9] +job initserver()
2014/03/01 04:05:35 Listening for HTTP on fd ()
[/var/lib/docker|0d71c177] +job create()
create: command not found
[/var/lib/docker|0d71c177] -job create()
[/var/lib/docker|0d71c177] +job acceptconnections()
[/var/lib/docker|0d71c177] -job initserver() = OK (0)
```

To fix the issue select on the activationLock and block until the
"acceptconnections" job has ran.

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
2014-03-01 10:55:36 -08:00
..
api_unit_test.go move api to it's own package 2014-01-29 19:26:54 +00:00
client.go Merge pull request #4078 from vieux/rewrite_rmi 2014-02-26 21:30:24 +02:00
common.go bump API version 2014-02-25 21:08:07 +00:00
container.go api/container.go: an API-specific representation of a container 2014-02-15 23:24:51 +00:00
MAINTAINERS update api Maintainers file 2014-02-25 23:19:44 +00:00
server.go fix(api): serve until the "acceptconnections" job 2014-03-01 10:55:36 -08:00