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

Force delete support for ASGs #315

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Force delete support for ASGs #315

wants to merge 2 commits into from

Conversation

acasas
Copy link

@acasas acasas commented Jun 11, 2013

This patch should allow users to force-delete ASGs. It follows a similar approach to what was already implemented for clusters, using the GroupDeleteOperation class.

@@ -450,13 +452,15 @@ class AutoScalingController {
String name = params.name
AutoScalingGroup group = awsAutoScalingService.getAutoScalingGroup(userContext, name)
Boolean showGroupNext = false
Boolean showTask = false
if (!group) {
flash.message = "Auto Scaling Group '${name}' not found."
} else {
if (group?.instances?.size() <= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Keeping this check defeats the purpose of this change.

@joesondow
Copy link
Contributor

It's helpful to include the Jira ID at the start of the pull request name, and at the start of one of the commits within the pull request.

@cloudbees-pull-request-builder

asgard-pull-requests #70 SUCCESS
This pull request looks good

@joesondow
Copy link
Contributor

Almost all of the code of the method deserves to be deleted and replaced with something more similar to what Cluster.delete does. The booleans and instance count protection and the try-catch blocks were only present because we were doing a synchronous Amazon call with a lot of edge cases to handle.

@joesondow
Copy link
Contributor

This actually wouldn't be an improvement for the user, since the purpose of using Force Delete is that it's possible to delete an ASG that still contains some instances, whether the instances are real or phantoms. There was an internal email this afternoon about this very problem.

@cloudbees-pull-request-builder

asgard-pull-requests #71 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

asgard-pull-requests #72 SUCCESS
This pull request looks good

@claymccoy
Copy link
Contributor

@joesondow Is there value in the extra work that GroupDeleteOperation is doing here? I'm asking not really for this issue, but to see if it should be in the new auto deploy workflow.

@cloudbees-pull-request-builder

asgard-pull-requests #73 SUCCESS
This pull request looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants