Skip to content

[24.0 backport] daemon: fix restoring container with missing task#45801

Merged
thaJeztah merged 1 commit intomoby:24.0from
thaJeztah:24.0_backport_fix-45788-restore-exit-status
Jun 23, 2023
Merged

[24.0 backport] daemon: fix restoring container with missing task#45801
thaJeztah merged 1 commit intomoby:24.0from
thaJeztah:24.0_backport_fix-45788-restore-exit-status

Conversation

@thaJeztah
Copy link
Member

Before 4bafaa0, if the daemon was killed while a container was running and the container shim is killed before the daemon is restarted, such as if the host system is hard-rebooted, the daemon would restore the container to the stopped state and set the exit code to 255. The aforementioned commit introduced a regression where the container's exit code would instead be set to 0. Fix the regression so that the exit code is once against set to 255 on restore.

(cherry picked from commit 165dfd6)

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Before 4bafaa0, if the daemon was
killed while a container was running and the container shim is killed
before the daemon is restarted, such as if the host system is
hard-rebooted, the daemon would restore the container to the stopped
state and set the exit code to 255. The aforementioned commit introduced
a regression where the container's exit code would instead be set to 0.
Fix the regression so that the exit code is once against set to 255 on
restore.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 165dfd6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 24.0.3 milestone Jun 23, 2023
@thaJeztah thaJeztah added the area/daemon Core Engine label Jun 23, 2023
@thaJeztah thaJeztah requested review from corhere and neersighted June 23, 2023 18:21
@thaJeztah thaJeztah merged commit 98518e0 into moby:24.0 Jun 23, 2023
@thaJeztah thaJeztah deleted the 24.0_backport_fix-45788-restore-exit-status branch June 23, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants