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:
Simon Westphahl 2024-10-09 10:57:11 +02:00
parent 2edaec0d5f
commit bcd1540117
No known key found for this signature in database

View File

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