-
Notifications
You must be signed in to change notification settings - Fork 373
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
[Backport release-1.30] Fix deletion of persistent data with k0s reset #5300
Merged
Conversation
This file contains 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
Make sure that we don't have anything mounted under those directories so we don't delete persistent data. We do this py parsing /proc/mounts in reverse order as it is listed in mount order, and then we unmount anything that is under our directories before we delete them. Don't umount datadir itself if it is on a separate partition/mount Fixes #4318 Signed-off-by: Natanael Copa <[email protected]> (cherry picked from commit 7ab81aa)
Add a script to the reset integration test that tries to clutter the data directory by placing files and directories with odd permissions, adding symlinks to stuff outside the data directory, and adding bind mounts in various ways. This is to prove that k0's reset will never delete anything that is not beneath the data directory. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit 2897c35)
k0s reset will delete any leftovers safely when deleting directories. Signed-off-by: Natanael Copa <[email protected]> (cherry picked from commit 12aa906)
16 tasks
twz123
approved these changes
Dec 9, 2024
This was referenced Dec 9, 2024
twz123
added
bug
Something isn't working
backport/release-1.29
PR that needs to be backported/cherrypicked to the release-1.29 branch
labels
Dec 10, 2024
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-1.29
git worktree add -d .worktree/backport-5300-to-release-1.29 origin/release-1.29
cd .worktree/backport-5300-to-release-1.29
git switch --create backport-5300-to-release-1.29
git cherry-pick -x 54fb78c8cf905103d6aed93df1b56a231229e052 aeea4ff58c9fcd9eebca14d730f092c315bb64b6 62de5e649d151e55f1ed54d4c3f71ceedd47d3a2 |
16 tasks
twz123
removed
the
backport/release-1.29
PR that needs to be backported/cherrypicked to the release-1.29 branch
label
Dec 11, 2024
twz123
added
the
backport/release-1.29
PR that needs to be backported/cherrypicked to the release-1.29 branch
label
Dec 11, 2024
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-1.29
git worktree add -d .worktree/backport-5300-to-release-1.29 origin/release-1.29
cd .worktree/backport-5300-to-release-1.29
git switch --create backport-5300-to-release-1.29
git cherry-pick -x 54fb78c8cf905103d6aed93df1b56a231229e052 aeea4ff58c9fcd9eebca14d730f092c315bb64b6 62de5e649d151e55f1ed54d4c3f71ceedd47d3a2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/release-1.29
PR that needs to be backported/cherrypicked to the release-1.29 branch
bug
Something isn't working
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.
Automated backport to
release-1.30
, triggered by a label in #5193.See #4318.