Commit a0150c51 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Acquire node allocation lock during node query

If locking is used (usually by ganeti-watcher), node allocations must be
temporarily blocked.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarHelga Velroyen <>
parent 0ab31d67
......@@ -5227,6 +5227,7 @@ class _NodeQuery(_QueryBase):
if self.do_locking:
# If any non-static field is requested we need to lock the nodes
lu.needed_locks[locking.LEVEL_NODE] = self.wanted
lu.needed_locks[locking.LEVEL_NODE_ALLOC] = locking.ALL_SET
def DeclareLocks(self, lu, level):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment