Skip to content
Snippets Groups Projects
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 <hansmi@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 0ab31d67
No related branches found
No related tags found
Loading
......@@ -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):
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment