Skip to content

aws: use one SQS queue name prefix for create and delete - #18951

Closed
dims wants to merge 1 commit into
kubernetes:masterfrom
dims:amazon-kops-sqs
Closed

dims wants to merge 1 commit into
kubernetes:masterfrom
dims:amazon-kops-sqs

Conversation

@dims

@dims dims commented Oct 30, 2026

Copy link
Copy Markdown
Member

kops update names the NTH queue with QueueNamePrefix(clusterName) (periods replaced, truncated to 75 characters with a hash, since #17877). kops delete listed queues by the untruncated prefix, so clusters with names over 75 characters leaked their queue. kubetest2-kops names clusters e2e-<job>.tests-kops-aws.k8s.io, so every kops AWS job with a name over 49 characters leaks one queue per run. The next run adopts the leaked queue, the janitor deletes it at 12 h, and NTH panics with AWS.SimpleQueueService.NonExistentQueue (e2e-ci-kubernetes-kops-al2023-aws-conformance-aws-cni, 2026-10-29); validation fails.

One helper in awsup for all three callers. The SQS mock does real prefix matching and implements DeleteQueue, which the lifecycle tests now reach. Affects release-1.34 and later.

AI assisted with the triage and the patch.

QueueNamePrefix truncates cluster names longer than 75 characters, but
`kops delete cluster` listed queues by the untruncated cluster name, so
the node-termination-handler queue of a long-named cluster was never
found and leaked.

Move the helper to awsup, next to GetClusterName40, and use it in the
model, the NTH addon template and the resource lister.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 30, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hakman 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

@kubernetes-prow kubernetes-prow Bot added the area/provider/aws Issues or PRs related to aws provider label Oct 30, 2026
@dims dims closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

1 participant