[cloud] Don't try to deregister an instance that isn't in the load balancer (#31660)
This commit is contained in:
parent
34e2019251
commit
90b6178e61
1 changed files with 4 additions and 0 deletions
|
@ -133,6 +133,10 @@ class ElbManager:
|
|||
# balancer. Ignore it and try the next one.
|
||||
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])
|
||||
|
||||
# The ELB is changing state in some way. Either an instance that's
|
||||
|
|
Loading…
Reference in a new issue