-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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/openstack: Safe Security Group Delete #3696
provider/openstack: Safe Security Group Delete #3696
Conversation
This passes all current acceptance tests on OpenStack Kilo. I'll leave this open for a day or so for comments. |
@@ -210,10 +212,20 @@ func resourceComputeSecGroupV2Delete(d *schema.ResourceData, meta interface{}) e | |||
return fmt.Errorf("Error creating OpenStack compute client: %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed this message should be s/creating/deleting/
while reviewing the diff below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, "creating" is correct here - it's making a new OpenStack client connection in order to do the delete. 😄
However, I do have a slightly cleaned up version coming right up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! Yes. ☕ ☕ ☕
LGTM |
This commit enables security groups to be deleted in a safe way by checking their state over a period of time. This fixes occurrences when the API says the instance is deleted but it is still in the process of being deleted by OpenStack and thus the security group returns an error saying that there are still instances attached to the group.
Just pushed a slightly modified version that adds an additional error check as well as takes advantage of |
Solid - looks good. 👍 @jtopjian you can merge - generally we merge with the GitHub button and immediately go to the CHANGELOG and use the in-browser edit to add a line about the change. I usually just copy the title from the PR, paste it into the CHANGELOG, edit it a bit and click save. 🚀 |
Awesome! Thanks! |
provider/openstack: Safe Security Group Delete
resource/emr_*: drop custom ValidateFuncs
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. |
This commit enables security groups to be deleted in a safe way by
checking their state over a period of time.
This fixes occurrences when the API says the instance is deleted but
it is still in the process of being deleted by OpenStack and thus the
security group returns an error saying that there are still instances
attached to the group.
Fixes #1782