Skip to content

Wait for the VMSS capacity update for 1 minute before async #8242

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

Closed
wants to merge 2 commits into from

Conversation

hakman
Copy link
Member

@hakman hakman commented Jun 13, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

In rare situations when the VMSS fails to scale (OverconstrainedAllocationRequest, OverconstrainedZonalAllocationRequest, ...), the error is not handled until the context timeout expires (max-node-provision-time).

Which issue(s) this PR fixes:

Fixes: N/A

Special notes for your reviewer:

This is just a suggestion from someone that is not that familiar with the CAS code, there may be better options available.

Does this PR introduce a user-facing change?

NONE

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

N/A

@k8s-ci-robot k8s-ci-robot added 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 Jun 13, 2025
@k8s-ci-robot k8s-ci-robot added area/cluster-autoscaler area/provider/azure Issues or PRs related to azure provider size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 13, 2025
@hakman
Copy link
Member Author

hakman commented Jun 13, 2025

/cc @tallaxes
/assign @tallaxes

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hakman
Once this PR has been reviewed and has the lgtm label, please ask for approval from tallaxes. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 13, 2025
Copy link

linux-foundation-easycla bot commented Jun 14, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 14, 2025
@hakman hakman force-pushed the wait-before-aysnc branch 2 times, most recently from b8302f3 to 1a249c1 Compare June 14, 2025 21:06
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 14, 2025
@hakman hakman force-pushed the wait-before-aysnc branch from 1a249c1 to 5292339 Compare June 15, 2025 13:34
@hakman hakman changed the title Wait for the VMSS capacity update until the context timeout expires Wait for the VMSS capacity update for 1 minute before async Jun 16, 2025
go func() {
ctx, cancel := getContextWithTimeout(asyncContextTimeout)
defer cancel()
_ = scaleSet.waitForCreateOrUpdateInstances(ctx, true, future)
Copy link
Contributor

Choose a reason for hiding this comment

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

rather than throw away this error here I'd get it and do something like this:

klog.Errorf("waitForCreateOrUpdateInstances(%s) failed, err: %v", scaleSet.Name, err)

And then get rid of the above log statement in waitForCreateOrUpdateInstances

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, I also kept the success message, same as I did above.

@hakman hakman force-pushed the wait-before-aysnc branch from 1f42625 to 54423f8 Compare June 23, 2025 17:01
@hakman hakman requested a review from jackfrancis June 23, 2025 17:07
@hakman hakman force-pushed the wait-before-aysnc branch from 54423f8 to 05a33ae Compare June 23, 2025 17:20
@hakman hakman force-pushed the wait-before-aysnc branch from 05a33ae to a292788 Compare June 23, 2025 20:52
@hakman
Copy link
Member Author

hakman commented Jul 22, 2025

The issue should also be addressed by setting AZURE_ENABLE_FAST_DELETE_ON_FAILED_PROVISIONING=true, see #8323.

@hakman hakman closed this Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. 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.

4 participants