Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cleanup not possible for cluster stack #7704

Closed
errordeveloper opened this issue Apr 5, 2024 · 4 comments
Closed

[Bug] Cleanup not possible for cluster stack #7704

errordeveloper opened this issue Apr 5, 2024 · 4 comments

Comments

@errordeveloper
Copy link
Contributor

What were you trying to accomplish?

I am trying to clean up a cluster that wasn't created successfully.

What happened?

I ran eksctl create cluster and it failed with this error:

2024-04-05 11:20:03 [ℹ]  building cluster stack "eksctl-ilya-test2g-cluster"
2024-04-05 11:20:04 [ℹ]  deploying stack "eksctl-ilya-test2g-cluster"
2024-04-05 11:20:34 [ℹ]  waiting for CloudFormation stack "eksctl-ilya-test2g-cluster"
2024-04-05 11:20:34 [✖]  unexpected status "ROLLBACK_IN_PROGRESS" while waiting for CloudFormation stack "eksctl-ilya-test2g-cluster"
2024-04-05 11:20:34 [✖]  unexpected status "ROLLBACK_IN_PROGRESS" while waiting for CloudFormation stack "eksctl-ilya-test2g-cluster"
2024-04-05 11:20:34 [ℹ]  fetching stack events in attempt to troubleshoot the root cause of the failure
2024-04-05 11:20:34 [!]  AWS::EC2::VPC/VPC: DELETE_IN_PROGRESS
2024-04-05 11:20:34 [!]  AWS::IAM::Role/ServiceRole: DELETE_IN_PROGRESS
2024-04-05 11:20:34 [!]  AWS::EC2::InternetGateway/InternetGateway: DELETE_IN_PROGRESS
2024-04-05 11:20:34 [✖]  AWS::EC2::VPC/VPC: CREATE_FAILED – "Resource creation cancelled"
2024-04-05 11:20:34 [✖]  AWS::IAM::Role/ServiceRole: CREATE_FAILED – "Resource creation cancelled"
2024-04-05 11:20:34 [✖]  AWS::EC2::InternetGateway/InternetGateway: CREATE_FAILED – "Resource creation cancelled"
2024-04-05 11:20:34 [✖]  AWS::EC2::EIP/NATIP: CREATE_FAILED – "Resource handler returned message: \"The maximum number of addresses has been reached. (Service: Ec2, Status Code: 400, Request ID: a4376182-05c8-429e-99b8-1061001c46db)\" (RequestToken: 66fcc5d8-2186-a4f7-286d-3ce3f6eaa50b, HandlerErrorCode: GeneralServiceException)"
2024-04-05 11:20:34 [!]  1 error(s) occurred and cluster hasn't been created properly, you may wish to check CloudFormation console
2024-04-05 11:20:34 [ℹ]  to cleanup resources, run 'eksctl delete cluster --region=eu-west-3 --name=ilya-test2g'
2024-04-05 11:20:34 [✖]  ResourceNotReady: failed waiting for successful resource state
Error: failed to create cluster "ilya-test2g"

If I copy the suggested command, which used to to work, it doesn't actually let me cleanup the cluster:

$ eksctl delete cluster --region=eu-west-3 --name=ilya-test2g
Error: unable to describe cluster control plane: operation error EKS: DescribeCluster, https response error StatusCode: 404, RequestID: 840c85fa-7649-4841-9eba-759621abd61d, ResourceNotFoundException: No cluster found for name: ilya-test2g.
$
@errordeveloper
Copy link
Contributor Author

It would be nice if eksctl delete cluster was able to clean up failed CloudFormation stacks. It used to be possible but had been blocked since the direct call to DescribeCluster was introduced.

@cPu1
Copy link
Collaborator

cPu1 commented Apr 8, 2024

Hi @errordeveloper, eksctl delete cluster supports a force flag that ignores errors and continues with the deletion process. Although I do agree that the delete command without any extra options should specifically handle deleting a non-existent cluster that has a CloudFormation stack.

@cPu1 cPu1 changed the title [Bug] Cleanup no possible for cluster stack [Bug] Cleanup not possible for cluster stack Apr 8, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label May 9, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants