Skip to content

add InvalidID error handling for tagging controller#1387

Merged
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
joshuakguo:kwok-tagging-fix
May 7, 2026
Merged

add InvalidID error handling for tagging controller#1387
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
joshuakguo:kwok-tagging-fix

Conversation

@joshuakguo

@joshuakguo joshuakguo commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:
adding handling for InvalidID errors when trying to tag nodes with invalid instance ids like KWOK nodes

in clusters with kwok nodes, we see errors like

E0422 17:39:44.497037      11 tagging_controller.go:318] Error in tagging EC2 instance i-eCHmOTcEW0OZ9KbNe for node amazing-cheetah-3240919213, error: operation error EC2: CreateTags, https response error StatusCode: 400, RequestID: 22fj3d8c-ca7a-1d88-0316-3jfb99sdfj154, api error InvalidID: The ID 'i-eCHmOTcEW0OZ9KbNe' is not valid

E0422 17:39:43.263647      11 tagging_controller.go:271] "Unhandled Error" err="error processing work item '[Node: amazing-cheetah-3240919213, RequeuingCount: 6, EnqueueTime: 2026-04-22 17:39:42.844113692 +0000 UTC m=+1673841.845249380]': operation error EC2: CreateTags, https response error StatusCode: 400, RequestID: 193nsbf9-32js-3jds-39ds-93dsl7f6jg8d, api error InvalidID: The ID 'i-eCHmOTcEW0OZ9KbNe' is not valid, requeuing count 6" logger="UnhandledError"

where the kwok nodes keeps on getting requeued over and over again, resulting in a constant stream of unhandled errors, we just drop trying to tag it

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 22, 2026
@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 22, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @joshuakguo. 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 k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 22, 2026
Comment thread pkg/providers/v1/aws.go

var ae smithy.APIError
if errors.As(err, &ae) {
return ae.ErrorCode() == "InvalidID"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

doesn't aws return UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceId ? https://github.com/aws/aws-sdk-go-v2/blob/main/service/ec2/types/enums.go#L11963

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I thought that too but in the docs https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html#api-error-codes-table-client InvalidID seems to be called out to be specifically different and for specifically tagging

@kmala

kmala commented Apr 24, 2026

Copy link
Copy Markdown
Member

/ok-to-test
/triage accepted

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed 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. labels Apr 24, 2026
@kmala

kmala commented May 6, 2026

Copy link
Copy Markdown
Member

/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 May 6, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kmala

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 6, 2026
@joshuakguo

Copy link
Copy Markdown
Contributor Author

/release-note-none

@k8s-ci-robot k8s-ci-robot merged commit 746099e into kubernetes:master May 7, 2026
11 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants