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

report vmPowerStateUnknown when vmssVM intanceView is nil #4798

Merged
merged 1 commit into from Oct 16, 2023

Conversation

jwtty
Copy link
Member

@jwtty jwtty commented Oct 13, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

When vmssVM instanceView or instanceView.Status is nil, it means the vm is under deleting, and GetPowerState() should not return powerStateStopped. This can result in a deleting vm being considered mistakenly as stopped and thus node shutdown/node out-of-service taints are added.
Fix log also.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix the potential error that a deleting vmss instance is considered as shutdown.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 13, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jwtty

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 13, 2023
@jwtty
Copy link
Member Author

jwtty commented Oct 14, 2023

/retest

@nilo19
Copy link
Contributor

nilo19 commented Oct 16, 2023

Do we need to change the counterparts of availabilitySet and vmss flex as well?

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 16, 2023
@jwtty
Copy link
Member Author

jwtty commented Oct 16, 2023

Do we need to change the counterparts of availabilitySet and vmss flex as well?

Thanks, fixed those two also.

@nilo19
Copy link
Contributor

nilo19 commented Oct 16, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 16, 2023
@k8s-ci-robot k8s-ci-robot merged commit 266c5e0 into kubernetes-sigs:master Oct 16, 2023
17 checks passed
@jwtty jwtty deleted the vm-deletion branch October 16, 2023 07:05
@jwtty
Copy link
Member Author

jwtty commented Oct 16, 2023

/cherrypick release-1.28

@jwtty
Copy link
Member Author

jwtty commented Oct 16, 2023

/cherrypick release-1.27

@k8s-infra-cherrypick-robot

@jwtty: new pull request created: #4804

In response to this:

/cherrypick release-1.28

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.

@k8s-infra-cherrypick-robot

@jwtty: new pull request created: #4805

In response to this:

/cherrypick release-1.27

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.

@jwtty
Copy link
Member Author

jwtty commented Oct 16, 2023

/cherrypick release-1.26

@jwtty
Copy link
Member Author

jwtty commented Oct 16, 2023

/cherrypick release-1.25

@k8s-infra-cherrypick-robot

@jwtty: new pull request created: #4806

In response to this:

/cherrypick release-1.26

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.

@k8s-infra-cherrypick-robot

@jwtty: #4798 failed to apply on top of branch "release-1.25":

Applying: report vmPowerStateUnknown when vmssVM intanceView is nil
Using index info to reconstruct a base tree...
M	pkg/provider/azure.go
M	pkg/provider/azure_instances.go
M	pkg/provider/azure_standard.go
M	pkg/provider/azure_standard_test.go
M	pkg/provider/azure_vmss.go
M	pkg/provider/azure_vmss_test.go
M	pkg/provider/azure_vmssflex.go
M	pkg/provider/azure_vmssflex_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_vmssflex_test.go
Auto-merging pkg/provider/azure_vmssflex.go
Auto-merging pkg/provider/azure_vmss_test.go
Auto-merging pkg/provider/azure_vmss.go
Auto-merging pkg/provider/azure_standard_test.go
Auto-merging pkg/provider/azure_standard.go
Auto-merging pkg/provider/azure_instances.go
Auto-merging pkg/provider/azure.go
CONFLICT (content): Merge conflict in pkg/provider/azure.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 report vmPowerStateUnknown when vmssVM intanceView is nil
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.25

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.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", 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 Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants