bottlerocket-os / bottlerocket-os/bottlerocket-test-system

Proposal: cluster creation failure should delete the CF stack

Open
#819 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
18
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Currently, if cluster creation fails for some reason, the agent's `eksctl` won't roll back the CF stack that was created. This can lead to latter results where subsequent cluster creations fail because the stack name is already taken:

```
2023-05-09 21:47:58 [✖] creating CloudFormation stack "eksctl-x86-64-aws-k8s-124-cluster":
operation error CloudFormation: CreateStack, https response error StatusCode:
400, RequestID: 3aedd327-554f-418c-8b7b-581c217787c0, Error: failed to create cluster "x86-64-aws-k8s-124"
```

Rollback completes succesfully but that stack name is still there. Not too hard to go in and manually clean up that stack, but would be great if this was alittle more 1-button-push

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by locating the agent's eksctl cluster-creation and CloudFormation stack cleanup paths, then trace what happens after a failed creation. Done means a failed cluster creation removes the created stack so a subsequent creation is not blocked by the existing stack name.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, rust
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.