-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Docker version 24.0.xx: Containers exiting with 0 status code on hard reboot #45788
Copy link
Copy link
Closed
Closed
Copy link
Labels
kind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.status/confirmedstatus/more-info-neededversion/24.0
Description
Description
Recently we noticed with Docker version 24.0.xx, the containers are exiting with 0 status code on hard reboot as seen below. This behavior was observed for containers running in both SWARM and COMPOSE mode.
In docker versions < 24.0.xx, the containers were exiting with non-zero status code.

This change in behavior with docker version 24.0.xx results in container not booting up after a hard reboot if restart policy is set to on-failure.
Reproduce
- Install docker version 24.0.2 in Ubuntu
- Run a sample container with restart-policy *on-failure
- Hard reboot the device
- Verify container is not restarted (but docker daemon is up)
- Check the exit code using
docker container ls -a. The exit code would be 0.
Expected behavior
- Container should exit with non-zero status code on hard reboot
- If restart-policy of the container is set to "on-failure", container should restart after a hard reboot
docker version
Client: Docker Engine - Community
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:52:22 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f
Built: Thu May 25 21:52:22 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0docker info
Client: Docker Engine - Community
Version: 24.0.2
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.5
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.18.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 1
Server Version: 24.0.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: nzif6vnxqpx5sr0svdmf5hcm3
Is Manager: true
ClusterID: wv0pvxeu1rf32tckcz3rfl4g8
Managers: 1
Nodes: 1
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 127.0.0.1
Manager Addresses:
127.0.0.1:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc version: v1.1.7-0-g860f061
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 5.4.0-150-lowlatency
Operating System: Ubuntu 20.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 5
Total Memory: 15.51GiB
Name: MDT4-AutoSlam-101
ID: 7fb4077d-5f78-4553-ae97-3c7b728fdb09
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: falseAdditional Info
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.status/confirmedstatus/more-info-neededversion/24.0
