Fix live-restore w/ restart policies + volume refs#44231
Merged
Conversation
Before this change restarting the daemon in live-restore with running containers + a restart policy meant that volume refs were not restored. This specifically happens when the container is still running *and* there is a restart policy that would make sure the container was running again on restart. The bug allows volumes to be removed even though containers are referencing them. 😱 Signed-off-by: Brian Goff <[email protected]>
thaJeztah
reviewed
Sep 30, 2022
Comment on lines
+388
to
+391
| t.Run("volume references", testLiveRestoreVolumeReferences) | ||
| } | ||
|
|
||
| func testLiveRestoreVolumeReferences(t *testing.T) { |
Member
There was a problem hiding this comment.
Was there a specific reason for splitting this into two functions? (I can see the reason for the subtests inside testLiveRestoreVolumeReferences(), but was a bit confused about the split here 😅 🤔
Member
Author
There was a problem hiding this comment.
Potential other live restore tests.
Just namespacing.
thaJeztah
approved these changes
Sep 30, 2022
thaJeztah
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks!
I was wondering indeed when reading that ticket some time ago, but hadn't found the time to dig in "what step" we were missing; thanks!
|
@cpuguy83 Wonderful work, thank you! |
corhere
approved these changes
Oct 3, 2022
This was referenced Oct 3, 2022
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change restarting the daemon in live-restore with running containers + a restart policy meant that volume refs were not restored. This specifically happens when the container is still running and there is a restart policy that would make sure the container was running again on restart.
The bug allows volumes to be removed even though containers are referencing them. 😱
Fixes #41686