[release-2.11] 🐛 fix: clean up orphaned ENIs before subnet deletion at teardown#6091
Conversation
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.
|
/test pull-cluster-api-provider-aws-e2e-eks-release-2-11 |
|
@k8s-infra-cherrypick-robot: The following test failed, say
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. DetailsInstructions 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. |
|
/test pull-cluster-api-provider-aws-e2e-release-2-11 |
|
LGTM label has been added. DetailsGit tree hash: e747524ae8ec7e92e0badf3252db2ee4bdf616bb |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c6d810a
into
kubernetes-sigs:release-2.11
This is an automated cherry-pick of #6073
/assign damdo