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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the deletion grace period to 1 on forced VM restarts #9861

Merged
merged 1 commit into from Jun 14, 2023

Conversation

rmohr
Copy link
Member

@rmohr rmohr commented Jun 6, 2023

What this PR does / why we need it:

In order to allow a swift and safe restart, set the deletion grace period to 1 on the pod delete when a force restart is requested.

One is the shortest safe restart period where we don't risk a split-brain scenario for VMs, since Zero effectively deletes the pod right away.

This leads to the following outcome:

  • If a guest OS is stuck, people get a swift restart.
  • Users don't risk data corruption.
  • Reserving a force pod delete for situations where the cluster is unhealthy.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #9830

Special notes for your reviewer:

Release note:

Fix the possibility of data corruption when requestin a force-restart via "virtctl restart"

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XS labels Jun 6, 2023
@rmohr
Copy link
Member Author

rmohr commented Jun 6, 2023

/cc @xpivarc

FYI that would be my suggestion.

@kubevirt-bot kubevirt-bot requested a review from xpivarc June 6, 2023 09:44
Copy link
Member

@xpivarc xpivarc left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xpivarc

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2023
In order to allow a swift and safe restart, set the deletion grace
period to 1 on the pod delete when a force restart is requested.

One is the shortest safe restart period where we don't risk a
split-brain scenario for VMs, since Zero effectively deletes the pod
right away.

This leads to the following outcome:
 * If a guest OS is stuck, people get a swift restart.
 * Users don't risk data corruption.
 * Reserving a force pod delete for situations where the cluster is
   unhealthy.

Signed-off-by: Roman Mohr <rmohr@google.com>
@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2023
@fossedihelm
Copy link
Contributor

/retest-required

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

4 similar comments
@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit 1607c64 into kubevirt:main Jun 14, 2023
35 checks passed
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. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Force restart VM expose the risk of data corruption
5 participants