diff --git a/nodepool/launcher.py b/nodepool/launcher.py index f91b1f6db..7a8faf2e9 100644 --- a/nodepool/launcher.py +++ b/nodepool/launcher.py @@ -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