Check node is unallocated before max-ready clean
Besides the state we also need to check whether a node is still unallocated before marking it as deleting during max-ready age cleanup. Change-Id: Idd369ce2c5a6f41bfe2986544b5e138399b57a2e
This commit is contained in:
parent
2edaec0d5f
commit
bcd1540117
@ -759,7 +759,7 @@ class CleanupWorker(BaseCleanupWorker):
|
||||
|
||||
# Double check the state now that we have a lock since it
|
||||
# may have changed on us.
|
||||
if node.state != zk.READY:
|
||||
if node.state != zk.READY or node.allocated_to:
|
||||
zk_conn.unlockNode(node)
|
||||
continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user