Commit 81cfd8e5 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

LUNodeQueryStorage: Use node allocation lock

Block instance allocations when all node locks will be acquired.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarMichele Tartara <>
parent e58009da
......@@ -5386,13 +5386,16 @@ class LUNodeQueryStorage(NoHooksLU):
def ExpandNames(self):
self.share_locks = _ShareAll()
self.needed_locks = {}
if self.op.nodes:
self.needed_locks[locking.LEVEL_NODE] = \
_GetWantedNodes(self, self.op.nodes)
self.needed_locks = {
locking.LEVEL_NODE: _GetWantedNodes(self, self.op.nodes),
self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET
self.needed_locks = {
locking.LEVEL_NODE: locking.ALL_SET,
locking.LEVEL_NODE_ALLOC: locking.ALL_SET,
def Exec(self, feedback_fn):
"""Computes the list of nodes and their attributes.
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