Skip to content

[release-2.11] 🐛 fix: clean up orphaned ENIs before subnet deletion at teardown#6091

Merged
kubernetes-prow[bot] merged 3 commits into
kubernetes-sigs:release-2.11from
k8s-infra-cherrypick-robot:cherry-pick-6073-to-release-2.11
Jul 4, 2026
Merged

[release-2.11] 🐛 fix: clean up orphaned ENIs before subnet deletion at teardown#6091
kubernetes-prow[bot] merged 3 commits into
kubernetes-sigs:release-2.11from
k8s-infra-cherrypick-robot:cherry-pick-6073-to-release-2.11

Conversation

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #6073

/assign damdo

fix: clean up orphaned network interfaces (ENIs) before subnet deletion during cluster teardown, preventing DependencyViolation errors caused by NLB ENIs that AWS cleans up asynchronously after load balancer deletion.

damdo added 3 commits July 3, 2026 13:35
After NLB deletion, AWS asynchronously cleans up the NLB's cross-AZ ENIs,
which can take up to 1 hour. CAPA proceeds immediately to SG/subnet
deletion with no ENI cleanup step, causing DependencyViolation errors
that block cluster deletion until the e2e test times out.

Add a deleteOrphanedENIs() step in DeleteNetwork(), before subnet deletion.
It discovers ENIs in the VPC that are in "available" state and reference
the cluster's security groups, then deletes them. This targets exactly the
ENIs blocking SG/subnet deletion without touching other clusters' ENIs.

Signed-off-by: Damiano Donati <damiano.donati@gmail.com>
ENI deletion operations now consistently use the passed reconciliation
context instead of context.TODO(), ensuring proper timeout semantics
throughout the entire ENI cleanup phase.
@kubernetes-prow kubernetes-prow Bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 3, 2026
@kubernetes-prow kubernetes-prow Bot requested review from faiq and richardcase July 3, 2026 13:35
@kubernetes-prow kubernetes-prow Bot added needs-priority cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 3, 2026
@damdo

damdo commented Jul 3, 2026

Copy link
Copy Markdown
Member

/test pull-cluster-api-provider-aws-e2e-eks-release-2-11

@kubernetes-prow

Copy link
Copy Markdown
Contributor

@k8s-infra-cherrypick-robot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-e2e-eks-release-2-11 c9f141a link false /test pull-cluster-api-provider-aws-e2e-eks-release-2-11

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@damdo

damdo commented Jul 4, 2026

Copy link
Copy Markdown
Member

/test pull-cluster-api-provider-aws-e2e-release-2-11

@damdo damdo left a comment

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.

/approve
/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 4, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: e747524ae8ec7e92e0badf3252db2ee4bdf616bb

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damdo

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

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 4, 2026
@kubernetes-prow kubernetes-prow Bot merged commit c6d810a into kubernetes-sigs:release-2.11 Jul 4, 2026
16 of 17 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants