Revision 7b3d70d4
b/lib/cmdlib.py | ||
---|---|---|
8162 | 8162 |
lu.needed_locks[locking.LEVEL_NODE_RES] = [] |
8163 | 8163 |
lu.recalculate_locks[locking.LEVEL_NODE_RES] = constants.LOCKS_REPLACE |
8164 | 8164 |
|
8165 |
# The node allocation lock is actually only needed for replicated instances
|
|
8166 |
# (e.g. DRBD8) and if an iallocator is used.
|
|
8165 |
# The node allocation lock is actually only needed for externally replicated
|
|
8166 |
# instances (e.g. sharedfile or RBD) and if an iallocator is used.
|
|
8167 | 8167 |
lu.needed_locks[locking.LEVEL_NODE_ALLOC] = [] |
8168 | 8168 |
|
8169 | 8169 |
|
... | ... | |
8671 | 8671 |
errors.ECODE_STATE) |
8672 | 8672 |
|
8673 | 8673 |
if instance.disk_template in constants.DTS_EXT_MIRROR: |
8674 |
assert locking.NAL in self.lu.owned_locks(locking.LEVEL_NODE_ALLOC) |
|
8675 |
|
|
8676 | 8674 |
_CheckIAllocatorOrNode(self.lu, "iallocator", "target_node") |
8677 | 8675 |
|
8678 | 8676 |
if self.lu.op.iallocator: |
8677 |
assert locking.NAL in self.lu.owned_locks(locking.LEVEL_NODE_ALLOC) |
|
8679 | 8678 |
self._RunAllocator() |
8680 | 8679 |
else: |
8681 | 8680 |
# We set set self.target_node as it is required by |
Also available in: Unified diff