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

Fix dry run using stop virctl command with grace-period #6780

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

fossedihelm
Copy link
Contributor

What this PR does / why we need it:
Fix a bug that occurs when a user uses both --dry-run and --grace-period=<value> in stop virctl command. It causes the patch of the vmi with the given grace-period which should not happen according to the dry-run specification. This happens due to a missed propagation of the DryRun value in the patch of the VMI, which occurs only when also grace-period is given

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:

Release note:

Add PatchOptions to the Patch request of the VirtualMachineInstanceInterface

@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/M needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 11, 2021
@kubevirt-bot
Copy link
Contributor

Hi @fossedihelm. Thanks for your PR.

I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@acardace
Copy link
Member

/ok-to-test

@kubevirt-bot kubevirt-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 15, 2021
Fix a bug that occurs when a user uses both --dry-run and --grace-period to stop virctl command. It causes the patch of the vmi with the given grace-period which should not happen according to the dry-run specification

Signed-off-by: fossedihelm <fossedihelm@gmail.com>
@fossedihelm
Copy link
Contributor Author

/retest

@xpivarc
Copy link
Member

xpivarc commented Nov 24, 2021

/cc

Copy link
Contributor

@enp0s3 enp0s3 left a comment

Choose a reason for hiding this comment

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

@fossedihelm Thank you!
/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enp0s3

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 Nov 24, 2021
Copy link
Contributor

@dhiller dhiller left a comment

Choose a reason for hiding this comment

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

Looks good, only one nit found, but no need to tackle this here.

tests/vm_test.go Show resolved Hide resolved
@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 24, 2021
@kubevirt-bot kubevirt-bot merged commit 7e3a071 into kubevirt:main Nov 24, 2021
@fossedihelm fossedihelm deleted the fix_dryRun_stopCommand branch November 17, 2022 14:52
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

6 participants