Discussion:
[ansible-project] Properly delete Amazon EC@ elastic load balancer
Erik Steffl
2015-07-25 03:13:49 UTC
Permalink
Deleting the elastic load balancer (ELB) sort of works
(using http://docs.ansible.com/ansible/ec2_elb_lb_module.html) but it does
not delete ELB elastic network interfaces (ENI), these are deleted later by
Amazon background process. This is mostly invisible to the user.

The problem is that the ENI is in the same subnet(s) and uses the same
security group(s) as the ELB. Which means that deleting of ELB security
group(s) and subnet(s) somewhat mysteriously fails with error " resource
sg-xxxxxxxx has a dependent object". Re-running the delete task later on
(usually few minutes later) works (ENI is removed by Amazon in the
meantime).

This is also discussed at http://unrouted.io/2015/04/12/elb-deletion/

Is this a known problem? Any ideas how to handle it now? Any plans to
handle it by ec2_elb_lb module?

It seems that currently there is no workaround possible (in 1.9.2, I see
that ec2_eni module is available in 2.0)

Any ideas how to handle it in 2.0? It seems that the only way to figure out
that the ENI belongs to a particular ELB is the description, I don't see
how to check if ENI with a given description exists.

Thanks!

erik
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c75596be-d19e-4557-988d-2289308aed11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-25 03:19:59 UTC
Permalink
it might be something we need to add to the modules, most of them
depend on boto, so if the capability is there it should not be hard to
add
Deleting the elastic load balancer (ELB) sort of works (using
http://docs.ansible.com/ansible/ec2_elb_lb_module.html) but it does not
delete ELB elastic network interfaces (ENI), these are deleted later by
Amazon background process. This is mostly invisible to the user.
The problem is that the ENI is in the same subnet(s) and uses the same
security group(s) as the ELB. Which means that deleting of ELB security
group(s) and subnet(s) somewhat mysteriously fails with error " resource
sg-xxxxxxxx has a dependent object". Re-running the delete task later on
(usually few minutes later) works (ENI is removed by Amazon in the
meantime).
This is also discussed at http://unrouted.io/2015/04/12/elb-deletion/
Is this a known problem? Any ideas how to handle it now? Any plans to handle
it by ec2_elb_lb module?
It seems that currently there is no workaround possible (in 1.9.2, I see
that ec2_eni module is available in 2.0)
Any ideas how to handle it in 2.0? It seems that the only way to figure out
that the ENI belongs to a particular ELB is the description, I don't see how
to check if ENI with a given description exists.
Thanks!
erik
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c75596be-d19e-4557-988d-2289308aed11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8k%2B_QJD59acCj9frZAATcT9pqDNfAp-TAZQtf%3DaxULX%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...