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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix live-restore w/ restart policies + volume refs #44231

Merged
merged 1 commit into from Oct 3, 2022

Conversation

cpuguy83
Copy link
Member

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

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 <cpuguy83@gmail.com>
Comment on lines +388 to +391
t.Run("volume references", testLiveRestoreVolumeReferences)
}

func testLiveRestoreVolumeReferences(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

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 馃槄 馃

Copy link
Member Author

Choose a reason for hiding this comment

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

Potential other live restore tests.
Just namespacing.

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, 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!

@thaJeztah thaJeztah added this to the v-next milestone Sep 30, 2022
@Chostakovitch
Copy link

@cpuguy83 Wonderful work, thank you!

@cpuguy83
Copy link
Member Author

cpuguy83 commented Oct 3, 2022

Backports: 22.06: #44237, 20.10: #44238

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.

docker volume prune removes ALL volumes when live restore is enabled and unless-stopped restart policy is used
4 participants