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: scale up broken for providers not implementing NodeGroup.GetOptions() #6677

Merged

Conversation

apricote
Copy link
Member

@apricote apricote commented Apr 2, 2024

What type of PR is this?

/kind bug
/kind documentation

What this PR does / why we need it:

Properly handle calls to NodeGroup.GetOptions() that return cloudprovider.ErrNotImplemented in the scale up path.

Which issue(s) this PR fixes:

Fixes #6676

Special notes for your reviewer:

All call sites check for options != nil right after the error check.

Does this PR introduce a user-facing change?

Fixed scaling up node groups for Hetzner Provider

I have only confirmed that this was actually affecting the Hetzner Provider, there are other providers that also return ErrNotImplemented, but I did not verify if there was user visible breakage for them.

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


…ons()

Properly handle calls to `NodeGroup.GetOptions()` that return
`cloudprovider.ErrNotImplemented` in the scale up path.
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. labels Apr 2, 2024
@k8s-ci-robot k8s-ci-robot added 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 Apr 2, 2024
@towca
Copy link
Collaborator

towca commented Apr 24, 2024

Thanks for reporting this!

I'm wondering if we could just change all of the cloud providers that return nil, cloudprovider.ErrNotImplemented to return nil, nil? That seems safer going forward, as the callers wouldn't have to remember to handle cloudprovider.ErrNotImplemented, and would preserve the semantics since returning nil options is supposed to fall back to the default options anyway.

@gjtempleton @MaciekPytel WDYT?

@towca
Copy link
Collaborator

towca commented Apr 24, 2024

@MaciekPytel volunteered for the long-term fix, merging this before that happens.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 24, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apricote, towca

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2024
@k8s-ci-robot k8s-ci-robot merged commit 0c26da3 into kubernetes:master Apr 24, 2024
6 checks passed
k8s-ci-robot added a commit that referenced this pull request Apr 24, 2024
[CA 1.30 #6677 cherry-pick] fix: scale up broken for providers not implementing NodeGroup.GetOptions()
k8s-ci-robot added a commit that referenced this pull request Apr 24, 2024
[CA 1.28 #6677 cherry-pick] fix: scale up broken for providers not implementing NodeGroup.GetOptions()
k8s-ci-robot added a commit that referenced this pull request Apr 24, 2024
[CA 1.29 #6677 cherry-pick] fix: scale up broken for providers not implementing NodeGroup.GetOptions()
BigDarkClown pushed a commit to BigDarkClown/autoscaler that referenced this pull request May 27, 2024
[CA 1.28 kubernetes#6677 cherry-pick] fix: scale up broken for providers not implementing NodeGroup.GetOptions()
BigDarkClown pushed a commit to BigDarkClown/autoscaler that referenced this pull request May 27, 2024
[CA 1.29 kubernetes#6677 cherry-pick] fix: scale up broken for providers not implementing NodeGroup.GetOptions()
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/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scale-up broken for Cloud Providers not implementing NodeGroup.GetOptions()
3 participants