Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.0 backport] liverestore: Don't remove --rm containers on restart #46869

Merged
merged 2 commits into from Nov 30, 2023

Conversation

vvoland
Copy link
Contributor

@vvoland vvoland commented Nov 30, 2023

When live-restore is enabled, containers with autoremove enabled shouldn't be forcibly killed when engine restarts.

(cherry picked from commit 3a0af5a)
(unclean cherry-pick)

- What I did

- How I did it
Added extra check and integration test.

- How to verify it
TestLiveRestore

- Description for the changelog

- live restore: Containers with auto remove (`docker run --rm`) are no longer forcibly removed on engine restart.

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

When live-restore is enabled, containers with autoremove enabled
shouldn't be forcibly killed when engine restarts.
They still should be removed if they exited while the engine was down
though.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit c5ea3d5)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Replace `time.Sleep` with a poll that checks if process no longer exists
to avoid possible race condition.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 3a0af5a)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added area/runtime kind/bugfix PR's that fix bugs labels Nov 30, 2023
@vvoland vvoland added this to the 24.0.8 milestone Nov 30, 2023
@vvoland vvoland self-assigned this Nov 30, 2023
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit afcd2cd into moby:24.0 Nov 30, 2023
102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants