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: reduce get disk calls in disk attach/detach on VMSS #8623

Merged
merged 1 commit into from
Mar 16, 2025

Conversation

andyzhangx
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

fix: reduce get disk call in disk attach/detach on VMSS, original code has a bug that when it's NotFound error, it would call getdisk, that's wrong, this PR fixes the issue.

I0314 13:36:11.257464       1 azure_armclient.go:380] Received error in WaitForAsyncOperationResult: '{"error":{"code":"ParentResourceNotFound","message":"Failed to perform 'read' on resource(s) of type 'virtualMachineScaleSets/virtualMachines', because the parent resource '/subscriptions/xxx/resourceGroups/subscription-81db8cb7-nodes/providers/Microsoft.Compute/virtualMachineScaleSets/aks-elastic-19571921-vmss' could not be found."}}', response code 404

I0314 13:36:11.257534       1 azure_vmssvmclient.go:346] Received error in vmssvm.put.request: resourceID: /subscriptions/xxx/resourceGroups/subscription-81db8cb7-nodes/providers/Microsoft.Compute/virtualMachineScaleSets/aks-elastic-19571921-vmss/virtualMachines/0, error: Retriable: false, RetryAfter: 0s, HTTPStatusCode: 404, RawError: {"error":{"code":"ParentResourceNotFound","message":"Failed to perform 'read' on resource(s) of type 'virtualMachineScaleSets/virtualMachines', because the parent resource '/subscriptions/xxx/resourceGroups/subscription-81db8cb7-nodes/providers/Microsoft.Compute/virtualMachineScaleSets/aks-elastic-19571921-vmss' could not be found."}}

E0314 13:36:11.257799       1 azure_controller_vmss.go:249] azureDisk - begin to filterNonExistingDisks(map[/subscriptions/xxx/resourcegroups/subscription-81db8cb7-nodes/providers/microsoft.compute/disks/pvc-4c600a8c-a823-414b-84f7-ea5e670888cc:pvc-4c600a8c-a823-414b-84f7-ea5e670888cc]) on rg(subscription-81db8cb7-nodes) vm(aks-elastic-19571921-vmss000000)

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: reduce get disk call in disk attach/detach on VMSS

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

fix: reduce get disk call in disk attach/detach on VMSS

@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. labels Mar 15, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 15, 2025
@andyzhangx andyzhangx changed the title fix: reduce get disk call in disk attach/detach on VMSS fix: reduce get disk calls in disk attach/detach on VMSS Mar 15, 2025
@andyzhangx andyzhangx merged commit 7ef23be into kubernetes-sigs:master Mar 16, 2025
17 of 18 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants