I was updated to a new release using the debian package, and get into a situation where the daemon has failed to stop, but the init script says its [ok]
there are a couple of problems here:
- stop should say that it failed, or if it will take a few seconds, it shoudl wait
- if the daemon has been asked to stop, but is waiting for a container, then the socket should remain, so the admin can do a
docker ps and decide what to do next (icing on the cake would be a restricted mode that does not allow new containers/images, pushes or builds, but allows inspection, pausing, stoping etc)
- there's a horrible window here, where an old daemon may be running, but the old binary is gone, so in the worst case, they may not be able to talk to it anymore - for eg, upgrading from 0.4 to 1.1.1.
root@x200s:/mnt/sda6/sven# /etc/init.d/docker stop
[ ok ] Stopping Docker: docker.
root@x200s:/mnt/sda6/sven# docker ps
2014/07/23 11:38:30 Error response from daemon: Server is not running
root@x200s:/mnt/sda6/sven# /etc/init.d/docker stop
[ ok ] Stopping Docker: docker.
root@x200s:/mnt/sda6/sven# /etc/init.d/docker stop
[ ok ] Stopping Docker: docker.
root@x200s:/mnt/sda6/sven# /etc/init.d/docker stop
[....] Stopping Docker: dockerstart-stop-daemon: warning: failed to kill 2681: No such process
1 pids were not killed
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
failed!
in the daemon logs I get
2014/07/23 11:37:00 Received signal 'terminated', starting shutdown of docker...
[debug] server.go:1022 Calling GET /containers/json
2014/07/23 11:38:30 GET /v1.13/containers/json
[debug] server.go:1031 Warning: client and server don't have the same version (client: 1.1.2, server: 1.1.0)
[25dda39c] +job containers()
Server is not running
[25dda39c] -job containers() = ERR (1)
[error] server.go:1048 Error making handler: Server is not running
[error] server.go:90 HTTP Error: statusCode=500 Server is not running
[debug] server.go:1022 Calling POST /build
2014/07/23 11:40:05 POST /build?rm=1&t=docker-docs%3Amaster
[debug] server.go:1031 Warning: client and server don't have the same version (client: 1.1.2, server: 1.1.0)
[25dda39c] +job build()
Server is not running
[25dda39c] -job build() = ERR (1)
[error] server.go:1048 Error making handler: Server is not running
[error] server.go:90 HTTP Error: statusCode=500 Server is not running
2014/07/23 11:45:03 Received signal 'terminated', starting shutdown of docker...
2014/07/23 11:45:04 Received signal 'terminated', starting shutdown of docker...
2014/07/23 11:45:04 Force shutdown of docker, interrupting cleanup
I was updated to a new release using the debian package, and get into a situation where the daemon has failed to stop, but the init script says its [ok]
there are a couple of problems here:
docker psand decide what to do next (icing on the cake would be a restricted mode that does not allow new containers/images, pushes or builds, but allows inspection, pausing, stoping etc)in the daemon logs I get