diff --git a/lib/cmdlib.py b/lib/cmdlib.py index eacf9ea7d6fbb8bdf4b1d8e2b1d3f5bccec2501e..b84e99e8cd836ccb9da65960988c62c6711dc4ac 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -10811,7 +10811,11 @@ class LUInstanceMultiAlloc(NoHooksLU): """ self.share_locks = _ShareAll() - self.needed_locks = {} + self.needed_locks = { + # iallocator will select nodes and even if no iallocator is used, + # collisions with LUInstanceCreate should be avoided + locking.LEVEL_NODE_ALLOC: locking.ALL_SET, + } if self.op.iallocator: self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET