Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@haircommander
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

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

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

add clean_shutdown_file option to allow crio/crio wipe to verify crio had time to shutdown cleanly

@openshift-ci-robot openshift-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jul 22, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2020
**--cgroup-manager**="": cgroup manager (cgroupfs or systemd) (default: systemd)

**--clean-shutdown-file**="": Location for CRI-O to lay down the clean shutdown file. It indicates whether we've had time to sync changes to disk before shutting down. If not found, crio wipe will clear the storage directory (default: /var/lib/crio/clean.shutdown)

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

},
&cli.StringFlag{
Name: "clean-shutdown-file",
Usage: "Location for CRI-O to lay down the clean shutdown file. It indicates whether we've had time to sync changes to disk before shutting down. If not found, crio wipe will clear the storage directory",
Copy link
Contributor

Choose a reason for hiding this comment

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

The verbiage is awesome, but is it too long for the usage? I'd a vague memory that we wanted (required?) these to be under 80 chars.

@TomSweeneyRedHat
Copy link
Contributor

LGTM, one question

@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

Merging #3999 (f48f90d) into master (49b2453) will decrease coverage by 0.08%.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##           master    #3999      +/-   ##
==========================================
- Coverage   40.44%   40.36%   -0.09%     
==========================================
  Files         115      115              
  Lines        9385     9414      +29     
==========================================
+ Hits         3796     3800       +4     
- Misses       5161     5182      +21     
- Partials      428      432       +4     

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2020
@haircommander
Copy link
Member Author

/test kata-containers

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 27, 2020
@umohnani8
Copy link
Member

/retest
LGTM

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 3, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 3, 2020
@mrunalp
Copy link
Member

mrunalp commented Aug 10, 2020

/retest

@giuseppe
Copy link
Member

/retest

@openshift-merge-robot
Copy link
Contributor

@haircommander: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-agnostic 3da2a60 link /test e2e-agnostic

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@nee1esh
Copy link

nee1esh commented Feb 4, 2021

/retest

@haircommander haircommander force-pushed the clean-shutdown branch 2 times, most recently from 3e32581 to d6659c0 Compare February 4, 2021 15:43
@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

/retest

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@giuseppe
Copy link
Member

giuseppe commented Feb 8, 2021

@mrunalp @umohnani8 @saschagrunert PTAL

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, haircommander, mrunalp, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [giuseppe,haircommander,mrunalp,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@giuseppe
Copy link
Member

@haircommander a merge conflict :(

@haircommander
Copy link
Member Author

/retest

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]>
@giuseppe
Copy link
Member

/retest

1 similar comment
@giuseppe
Copy link
Member

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 15, 2021

@haircommander: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-gcp f48f90d link /test e2e-gcp
ci/prow/e2e-agnostic f48f90d link /test e2e-agnostic

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@giuseppe
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2021
@openshift-merge-robot openshift-merge-robot merged commit 6b6d9ed into cri-o:master Feb 18, 2021
@haircommander
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-1.19 release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants