[ADMIN_API] Don't change LB state on node state change
It is possible for a monitor problem to happen at the same time as a DELETE changing state from PENDING_DELETE/DELETED to DEGRADED/ACTIVE. This patch stops the state changing if the initial state is not correct Change-Id: I4af872c3eb05a526acc489029c29e037596b9abe
This commit is contained in:

committed by
David Shrewsbury

parent
ee626114e4
commit
277a48d31d
@@ -58,10 +58,10 @@ class DbDriver(AlertDriver):
|
||||
|
||||
if lb.status == 'ERROR':
|
||||
lb.errmsg = "Load balancer has failed"
|
||||
elif degraded:
|
||||
elif lb.status == 'ACTIVE' and degraded:
|
||||
lb.errmsg = "A node on the load balancer has failed"
|
||||
lb.status = 'DEGRADED'
|
||||
else:
|
||||
elif lb.status == 'DEGRADED' and not degraded:
|
||||
lb.errmsg = "A node on the load balancer has recovered"
|
||||
lb.status = 'ACTIVE'
|
||||
|
||||
|
Reference in New Issue
Block a user