docker kill prevents containers with unless-stopped restart policy to be started after reboot #47792
Labels
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
Description
According to the doc
docker kill
command may be used to issue non-terminating signals to processes running inside containers. I.e. it's a regular practice for daemons to handleSIGHUP
signal to reload its configuration. Another example is Java applications which dump their stack traces onSIGQUIT
.When a container is signalled with non-terminating signal with
docker kill
ordocker-compose kill
it continues to run and no indication is given that the container is a subject for termination (i.e. viadocker inspect
command). However if the container has restart policy set tounless-stopped
it's no longer started after host system reboot (be it either soft or hard one).Also there is no any indication in logs or in output of
docker inspect
why it has not started on boot. The exit code may differ depending on kind of reboot/reset happened though.Reproduce
Expected behavior
docker kill should not affect restarts of the container on reboot
docker version
Client: Docker Engine - Community Version: 26.1.1 API version: 1.45 Go version: go1.21.9 Git commit: 4cf5afa Built: Tue Apr 30 11:47:54 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 26.1.1 API version: 1.45 (minimum version 1.24) Go version: go1.21.9 Git commit: ac2de55 Built: Tue Apr 30 11:47:54 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.31 GitCommit: e377cd56a71523140ca6ae87e30244719194a521 runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
Initially observed on docker 24.0.5 from Ubuntu distribution packages. We bumped into this in the production. It was especially annoying because issuing non-terminating kills to containers to inspect them and reboots/resets were spaced out in time and there were no any hints provided by docker about the reasons containers were failed to restart.
The text was updated successfully, but these errors were encountered: