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

Flintrock crashes if it can't delete security group #219

Open
thagorx opened this issue Nov 19, 2017 · 3 comments
Open

Flintrock crashes if it can't delete security group #219

thagorx opened this issue Nov 19, 2017 · 3 comments

Comments

@thagorx
Copy link

thagorx commented Nov 19, 2017

  • Flintrock version: 0.9.0
  • Python version: 3.5

Flintrock chrashes when I try to destroy a cluster. The problem occurs because I use the cluster security group to allow the cluster access to an EFS drive. When I try to destroy the cluster flintrock crashes with the error messages that it could not delete the security group because it is still used by another object. In my case the the security group is still used by the security group used for the EFS .

@nchammas
Copy link
Owner

So you reference the Flintrock security group in another security group, right? I'm not sure how Flintrock can handle this case. Flintrock will never touch any resources it did not create itself, so it is strictly out of bounds to expect Flintrock to go and modify the rules in a non-Flintrock security group.

This doesn't seem like a problem to me. If you create a security group dependency that Flintrock does not manage, then it's on you to remove that dependency before trying to destroy the cluster. And it sounds like the error message you get when you don't do that is clear enough to suggest what the issue is.

Is there some other approach you think we should take here?

@thagorx
Copy link
Author

thagorx commented Nov 20, 2017

Yes I reference the Flintrock security group in another group. It is not a problem that Flintrock fails to delete it's own security group, but rather that it fails with a exception (see attachment). The result is that the ec2 instances do not get shutdown. I can do it manually but would it not be more graceful to simply display an error message and continue with the cluster shutdown?
cluster destroy exception.txt

@nchammas
Copy link
Owner

There are some nitpicky details we need to keep in mind, but I think yes, it is possible to terminate the instances before trying to delete the security group.

Basically, the destroy procedure needs to do things in this order:

  1. Detach the cluster security group from instances.
  2. Terminate the instances.
  3. Delete the security group.

If you want to submit a PR to fix this, go ahead! I'd be happy to review it and guide you through the process. Otherwise, I'll put this on my list to tackle later.

@nchammas nchammas changed the title Flintrock crashes if it can't delet security group Flintrock crashes if it can't delete security group Mar 9, 2018
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

No branches or pull requests

2 participants