-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[1.20] introduce clean shutdown handling #5229
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
[1.20] introduce clean shutdown handling #5229
Conversation
there are cases where crio doesn't get the chance to sync before shutdown. In these cases, container storage can be corrupted. We need to protect against this case by wiping all of storage if we detect we didn't cleanly shutdown. Add an option to specify a clean_shutdown_file that crio will create upon syncing at shutdown Add an option to crio-wipe to clear all of storage if that file is not present Add integration tests to verify Signed-off-by: Peter Hunt <[email protected]>
We created the CleanShutdownFile to work around issues where nodes didn't have time to sync changes to disk before rebooting. This caused an unclean reboot. However, for this to be relevant, the node had to actually reboot. If it didn't, we could fail to remove the storage because the containers are still running. In this case, we shouldn't wipe anything. Signed-off-by: Peter Hunt <[email protected]>
or else, we will unconditionally try to remove the whole directory after upgrading from 1.20, rather than pointedly removing crio specific containers Signed-off-by: Peter Hunt <[email protected]>
This showed up when I was grepping a journal for `error:`, and it's not an error. Signed-off-by: Colin Walters <[email protected]>
2686d42 to
4a61d3c
Compare
|
/retest |
|
okay, verified that this is what we have in 1.21. |
mrunalp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, mrunalp The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
cherry-pick of #3999, #4691, #4697 and #5144
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?