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

pull/31711/merge
Sloane Hertel 7 years ago committed by Ryan Brown
parent 34e2019251
commit 90b6178e61

@ -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

Loading…
Cancel
Save