Properly delete Amazon EC@ elastic load balancer

54 views
Skip to first unread message

Erik Steffl

unread,
Jul 24, 2015, 11:13:49 PM7/24/15
to Ansible Project
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).


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

Brian Coca

unread,
Jul 24, 2015, 11:20:02 PM7/24/15
to Ansible Project
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
> --
> 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-proje...@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
Reply all
Reply to author
Forward
0 new messages