1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[cloud] Don't try to deregister an instance that isn't in the load balancer (#31660)

This commit is contained in:
Sloane Hertel 2017-10-13 13:59:24 -04:00 committed by Ryan Brown
parent 34e2019251
commit 90b6178e61

View file

@ -133,6 +133,10 @@ class ElbManager:
# balancer. Ignore it and try the next one. # balancer. Ignore it and try the next one.
continue continue
# The instance is not associated with any load balancer so nothing to do
if not self._get_instance_lbs():
return
lb.deregister_instances([self.instance_id]) lb.deregister_instances([self.instance_id])
# The ELB is changing state in some way. Either an instance that's # The ELB is changing state in some way. Either an instance that's