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

instancetype: Introduce PreferredTerminationGracePeriodSeconds #9744

Conversation

lyarwood
Copy link
Member

@lyarwood lyarwood commented May 15, 2023

/hold
/area instancetype

What this PR does / why we need it:

This change introduces a simple preferred preference attribute for the
VirtualMachineInstance TerminationGracePeriodSeconds attribute. This is
often increased for Windows VirtualMachines thus it would be useful if
users could set this from a given Windows based preference.

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 #

Special notes for your reviewer:

Based on #9575

Release note:

Allow to define the preferred termination grace period in VirtualMachine{Preferences,ClusterPreferences}

@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/instancetype do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels May 15, 2023
@kubevirt-bot kubevirt-bot added size/XXL area/monitoring kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels May 15, 2023
@lyarwood lyarwood changed the title Instancetype preferred termination grace period seconds instancetype: Introduce preferredTerminationGracePeriodSeconds May 18, 2023
@lyarwood lyarwood changed the title instancetype: Introduce preferredTerminationGracePeriodSeconds instancetype: Introduce PreferredTerminationGracePeriodSeconds May 18, 2023
if preferenceSpec.PreferredTerminationGracePeriodSeconds == nil {
return
}
vmiSpec.TerminationGracePeriodSeconds = pointer.Int64(*preferenceSpec.PreferredTerminationGracePeriodSeconds)
Copy link
Member

Choose a reason for hiding this comment

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

What if vmiSpec.TerminationGracePeriodSeconds != nil? This would override the value set by the user? (no longer a preference)

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 25, 2023
@0xFelix 0xFelix force-pushed the instancetype-preferredTerminationGracePeriodSeconds branch from e634d07 to f988307 Compare May 31, 2023 09:11
@kubevirt-bot kubevirt-bot added size/L and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL labels May 31, 2023
@0xFelix 0xFelix force-pushed the instancetype-preferredTerminationGracePeriodSeconds branch from f988307 to 4411916 Compare May 31, 2023 09:26
@0xFelix
Copy link
Member

0xFelix commented May 31, 2023

/unhold

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 31, 2023
@dhiller dhiller marked this pull request as ready for review May 31, 2023 09:45
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 31, 2023
@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 1, 2023
@0xFelix 0xFelix force-pushed the instancetype-preferredTerminationGracePeriodSeconds branch from 4411916 to d078f88 Compare June 1, 2023 06:46
@@ -21,6 +21,7 @@ package v1alpha2

import (
conversion "k8s.io/apimachinery/pkg/conversion"

Copy link
Member

Choose a reason for hiding this comment

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

super nit: extra empty line

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2023
@alicefr
Copy link
Member

alicefr commented Jun 1, 2023

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alicefr

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 1, 2023
@0xFelix 0xFelix force-pushed the instancetype-preferredTerminationGracePeriodSeconds branch from d078f88 to 775826f Compare June 1, 2023 07:18
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2023
@0xFelix 0xFelix force-pushed the instancetype-preferredTerminationGracePeriodSeconds branch from 775826f to 6523ec9 Compare June 1, 2023 07:24
@kubevirt-bot kubevirt-bot added size/L and removed size/M labels Jun 1, 2023
Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2023
@0xFelix 0xFelix force-pushed the instancetype-preferredTerminationGracePeriodSeconds branch from 6523ec9 to 304cfa6 Compare June 1, 2023 08:33
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2023
@0xFelix
Copy link
Member

0xFelix commented Jun 1, 2023

/lgtm
/retest-required

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2023
@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.

1 similar comment
@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.

This change introduces a simple preferred preference attribute for the
VirtualMachineInstance TerminationGracePeriodSeconds attribute. This is
often increased for Windows VirtualMachines thus it would be useful if
users could set this from a given Windows based preference.

Co-authored-by: Felix Matouschek <fmatouschek@redhat.com>
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
@0xFelix 0xFelix force-pushed the instancetype-preferredTerminationGracePeriodSeconds branch from 304cfa6 to 75ca3ee Compare June 2, 2023 07:49
@kubevirt-bot kubevirt-bot added size/M and removed lgtm Indicates that a PR is ready to be merged. size/L labels Jun 2, 2023
@0xFelix
Copy link
Member

0xFelix commented Jun 2, 2023

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 2, 2023
@kubevirt-bot
Copy link
Contributor

@lyarwood: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubevirt-e2e-k8s-1.26-sig-compute 75ca3ee link unknown /test pull-kubevirt-e2e-k8s-1.26-sig-compute

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.

@kubevirt-bot kubevirt-bot merged commit de63822 into kubevirt:main Jun 2, 2023
32 of 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. area/instancetype area/monitoring dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants