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

provider/aws: Fix issue with tainted ASG groups failing to re-create #1353

Merged
merged 1 commit into from
Apr 1, 2015

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Apr 1, 2015

Auto Scaling groups can take a minute or two to fully delete even after being drained. In the case of recreating them (ex. a tainted ASG), the immediate re-create attempt will fail because the original still exists, and the new one violates a name constraint.

This PR fixes #1105 by waiting on the ASG to fully delete before returning from the resourceAwsAutoscalingGroupDelete function. The timeout is set at 5 minutes, but in practice it's usually less than 1 minute.

return resource.Retry(5*time.Minute, func() error {
if g, _ = getAwsAutoscalingGroup(d, meta); g != nil {
return fmt.Errorf("Auto Scaling Group still exists")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check the error here and return a RetryError just so we're not waiting around 5m when the internet drops out?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this just now and it's 👌 :shipit:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAwsAutoscalingGroup only returns a non-nil g if it found the ASG, in which case we want to continue to pool

catsby added a commit that referenced this pull request Apr 1, 2015
provider/aws: Fix issue with tainted ASG groups failing to re-create
@catsby catsby merged commit 9d91c80 into master Apr 1, 2015
@pmoust
Copy link
Contributor

pmoust commented Apr 1, 2015

👍

@ghost
Copy link

ghost commented May 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

providers/aws: aws_autoscaling_group -/+ should wait till scaling group is removed before recreating
3 participants