pulumi-eks: Integration Test Flake: DependencyViolation NodeSecurityGroup has a dependent object
We started getting an elevated amount of flakes related to the node SecurityGroup failing to be deleted e.g. https://github.com/pulumi/pulumi-eks/issues/1219.
aws:ec2:SecurityGroup (example-cluster-py-3-nodeSecurityGroup):
error: deleting urn:pulumi:p-it-fv-az1210--cluster-py-37ea6979::example-cluster-py::eks:index:Cluster$aws:ec2/securityGroup:SecurityGroup::example-cluster-py-3-nodeSecurityGroup: 1 error occurred:
* deleting Security Group (sg-0e8b6d9244b79c723): DependencyViolation: resource sg-0e8b6d9244b79c723 has a dependent object
status code: 400, request id: 1b401e09-4dda-4402-8a4e-95c43e03dbec
There might be missing dependency links between resources (e.g. nodes depending on the node SecurityGroup).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- Set IgnoreDestroyErrors on TestAccClusterPy Fixes #1222 The test is weakened to ignore destroy errors to stabilize CI. — committed to pulumi/pulumi-eks by t0yv0 2 years ago
- Set IgnoreDestroyErrors on TestAccClusterPy (#1277) Fixes #1222 Fixes https://github.com/pulumi/pulumi-eks/issues/1276 The test is weakened to ignore destroy errors to stabilize CI. — committed to JustASquid/pulumi-eks by t0yv0 2 years ago
- chore: IgnoreDestroyErrors is set for all tests in CI (#1296) ### Proposed changes To stabilize CI the IgnoreDestroyErrors option is now set on all the tests, not just the Python Cluster test. Th... — committed to JustASquid/pulumi-eks by t0yv0 2 years ago
- Set IgnoreDestroyErrors on TestAccClusterPy (#1277) Fixes #1222 Fixes https://github.com/pulumi/pulumi-eks/issues/1276 The test is weakened to ignore destroy errors to stabilize CI. — committed to pulumi/pulumi-eks by t0yv0 2 years ago
- chore: IgnoreDestroyErrors is set for all tests in CI (#1296) ### Proposed changes To stabilize CI the IgnoreDestroyErrors option is now set on all the tests, not just the Python Cluster test. Th... — committed to pulumi/pulumi-eks by t0yv0 2 years ago
As a quick workaround for now so we don’t have to manually re-run failed jobs, we could just ignore the success of the teardown operation perhaps?
Linking an older issue that might be of relevance: https://github.com/pulumi/pulumi-eks/issues/194
The test flake isn’t strictly limited to just the
ClusterPytest. I’ve noticed other tests failing for the same reason in the past, and sometimes during PR pre-submit CI runs.Examples: https://github.com/pulumi/pulumi-eks/actions/runs/9559840213/job/26351075166 (
StorageClassesnodejs) https://github.com/pulumi/pulumi-eks/actions/runs/8948485838/job/24581728839 (Oidcclaimnodejs)The last time I did a quick look into this, I came across several relevant issues in upstream AWS TF provider, and eksctl. Mainly, that ENIs created by resources within the cluster (and thus would be outside of Pulumi’s management), are not properly deleted when the cluster is terminated. When I poked around in the AWS console once after a failed test, it was indeed a dangling ENI that was the problem.
A potential solution might be that when we destroy an EKS cluster, we could first delete any workloads on cluster to ensure that external resources (eg. ENIs) can be also be deleted by the on-cluster controllers.
Ref: https://github.com/eksctl-io/eksctl/issues/4214