Skip to content

fix: AWS HasInstance should ignore unrecognized provider IDs#9801

Open
Arthurhussey wants to merge 1 commit into
kubernetes:masterfrom
Arthurhussey:fix-hasinstance-unrecognized-provider-id
Open

fix: AWS HasInstance should ignore unrecognized provider IDs#9801
Arthurhussey wants to merge 1 commit into
kubernetes:masterfrom
Arthurhussey:fix-hasinstance-unrecognized-provider-id

Conversation

@Arthurhussey

Copy link
Copy Markdown

What type of PR is this?

/kind bug
/area provider/aws

What this PR does / why we need it:

The AWSCloudProvider only supports aws://zone/name ProviderIDs. #8047 fixed NodeGroupForNode to ignore ProviderIDs it does not recognize (e.g. eks-hybrid://... for EKS Hybrid Nodes, or SageMaker HyperPod nodes joined to an EKS cluster), but HasInstance still propagates the parse error, which surfaces as errors in the autoscaler loop when such nodes are present in the cluster.

This applies the same handling to HasInstance: log at V(6) and report the node as not present, matching the existing pattern in NodeGroupForNode.

Which issue(s) this PR fixes:

None filed; same class of issue as #8047.

Special notes for your reviewer:

Adds a test case to TestHasInstance mirroring the one added in #8047.

🤖 Generated with Claude Code

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 11, 2026

Copy link
Copy Markdown

CLA Missing ID

One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via:

Co-authored-by: name <email>

Supported Co-authored-by: formats include:

  1. Anything <id+login@users.noreply.github.com> - it will locate your GitHub user by id part.
  2. Anything <login@users.noreply.github.com> - it will locate your GitHub user by login part.
  3. Anything <public-email> - it will locate your GitHub user by public-email part. Note that this email must be made public on Github.
  4. Anything <other-email> - it will locate your GitHub user by other-email part but only if that email was used before for any other CLA as a main commit author.
  5. login <any-valid-email> - it will locate your GitHub user by login part, note that login part must be at least 3 characters long.

Alternatively, if the co-author should not be included, remove the Co-authored-by: line from the commit message.

Please update your commit message(s) by doing git commit --amend and then git push [--force] and then request re-running CLA check via commenting on this pull request:

/easycla

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jun 11, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. area/provider/aws Issues or PRs related to aws provider needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 11, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If SIG Autoscaling contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

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-sigs/prow repository.

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Welcome @Arthurhussey!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @Arthurhussey. Thanks for your PR.

I'm waiting for a kubernetes 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.

Details

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-sigs/prow repository.

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found here.

Details 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/cluster-autoscaler Issues or PRs related to the Cluster Autoscaler component size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 11, 2026
The AWSCloudProvider only supports aws://zone/name ProviderIDs. kubernetes#8047
fixed NodeGroupForNode to ignore ProviderIDs it does not recognize
(e.g. eks-hybrid:// for EKS Hybrid Nodes, or SageMaker HyperPod nodes
joined to an EKS cluster), but HasInstance still propagates the parse
error, which surfaces as errors in the autoscaler loop when such nodes
are present. Apply the same handling: log at V(6) and report the node
as not present.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Arthurhussey Arthurhussey force-pushed the fix-hasinstance-unrecognized-provider-id branch from 5940b9a to 4e7ce42 Compare June 11, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cluster-autoscaler Issues or PRs related to the Cluster Autoscaler component area/provider/aws Issues or PRs related to aws provider cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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.

2 participants