-
Notifications
You must be signed in to change notification settings - Fork 275
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
Improve rke2-uninstall.ps1 #6098
Merged
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6098 +/- ##
==========================================
- Coverage 26.10% 26.09% -0.01%
==========================================
Files 32 32
Lines 2697 2698 +1
==========================================
Hits 704 704
- Misses 1947 1948 +1
Partials 46 46
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
rbrtbnfgl
approved these changes
Jun 4, 2024
manuelbuil
force-pushed
the
improverke2uninstallwin
branch
from
June 4, 2024 16:58
4a65869
to
5dbe937
Compare
manuelbuil
force-pushed
the
improverke2uninstallwin
branch
from
June 4, 2024 18:33
5dbe937
to
90604ab
Compare
manuelbuil
force-pushed
the
improverke2uninstallwin
branch
from
June 5, 2024 09:06
90604ab
to
ebd7970
Compare
Signed-off-by: Manuel Buil <mbuil@suse.com>
manuelbuil
force-pushed
the
improverke2uninstallwin
branch
from
June 5, 2024 20:27
ebd7970
to
04dff5a
Compare
briandowns
approved these changes
Jun 5, 2024
manuelbuil
added a commit
to manuelbuil/rke2
that referenced
this pull request
Jun 6, 2024
Signed-off-by: Manuel Buil <mbuil@suse.com>
manuelbuil
added a commit
to manuelbuil/rke2
that referenced
this pull request
Jun 6, 2024
Signed-off-by: Manuel Buil <mbuil@suse.com>
manuelbuil
added a commit
to manuelbuil/rke2
that referenced
this pull request
Jun 6, 2024
Signed-off-by: Manuel Buil <mbuil@suse.com>
This was referenced Jun 6, 2024
brandond
pushed a commit
that referenced
this pull request
Jun 7, 2024
Signed-off-by: Manuel Buil <mbuil@suse.com>
brandond
pushed a commit
that referenced
this pull request
Jun 7, 2024
Signed-off-by: Manuel Buil <mbuil@suse.com>
brandond
pushed a commit
that referenced
this pull request
Jun 7, 2024
Signed-off-by: Manuel Buil <mbuil@suse.com>
iamsarthakk
pushed a commit
to iamsarthakk/rke2
that referenced
this pull request
Aug 19, 2024
Signed-off-by: Manuel Buil <mbuil@suse.com>
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.
Proposed Changes
After a QA iteration, we realized that the previous PR fixing the rke2 uninstallation is still not capable of removing all containerd resources in all environments. Main detected problems:
1 - Time out is too small for certain environments
2 - If we try removing the containerd namespace when there are resources there is an error message which could be confusing for some users
3 - Rarely snapshots get stuck and they require to be removed explicitly
This PR does the following:
1 - Increases the timeout to 3 minutes
2 - To avoid the confusing error message, it does not try to remove the containerd namespace until all the snapshots are gone. Note that the typical resources in a containerd namespace are tasks, containers, images and snapshots. We are removing the first three and once those three are removed, snapshots should be empty (except when snapshots get stuck)
3 - If timeout is reached, we try to remove the snapshots explicitly. If the namespace still can't be removed, we warn the user that the uninstall script might leave some files behind in
/var/lib/rancher/rke2
4 - It adds some extra logs and comments to clarify what's going on
Types of Changes
Bugfix
Verification
Install rke2 on linux and windows. Deploy a pod in windows. Run the rke2-uninstall.ps1 script. Without this PR, half of the time the script will fail and it will be impossible to remove the directory /var/lib/rancher.
With this PR, the script works and /var/lib/rancher does not exist anymore
Testing
Linked Issues
#5778
User-Facing Change
Further Comments