Revision af797be5
b/lib/cmdlib.py | ||
---|---|---|
7874 | 7874 |
|
7875 | 7875 |
instance = lu.cfg.GetInstanceInfo(lu.op.instance_name) |
7876 | 7876 |
|
7877 |
# Node locks are already declared here rather than at LEVEL_NODE as we need |
|
7878 |
# the instance object anyway to declare the node allocation lock. |
|
7877 | 7879 |
if instance.disk_template in constants.DTS_EXT_MIRROR: |
7878 | 7880 |
if lu.op.target_node is None: |
7879 | 7881 |
lu.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET |
... | ... | |
7887 | 7889 |
|
7888 | 7890 |
elif level == locking.LEVEL_NODE: |
7889 | 7891 |
# Node locks are declared together with the node allocation lock |
7890 |
assert lu.needed_locks[locking.LEVEL_NODE] |
|
7892 |
assert (lu.needed_locks[locking.LEVEL_NODE] or |
|
7893 |
lu.needed_locks[locking.LEVEL_NODE] is locking.ALL_SET) |
|
7891 | 7894 |
|
7892 | 7895 |
elif level == locking.LEVEL_NODE_RES: |
7893 | 7896 |
# Copy node locks |
Also available in: Unified diff