Revision c113a9ab lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
7363 | 7363 |
self.needed_locks[locking.LEVEL_NODE] = [] |
7364 | 7364 |
self.recalculate_locks[locking.LEVEL_NODE] = constants.LOCKS_REPLACE |
7365 | 7365 |
|
7366 |
self.needed_locks[locking.LEVEL_NODE_RES] = [] |
|
7367 |
self.recalculate_locks[locking.LEVEL_NODE_RES] = constants.LOCKS_REPLACE |
|
7368 |
|
|
7366 | 7369 |
ignore_consistency = self.op.ignore_consistency |
7367 | 7370 |
shutdown_timeout = self.op.shutdown_timeout |
7368 | 7371 |
self._migrater = TLMigrateInstance(self, self.op.instance_name, |
... | ... | |
7385 | 7388 |
del self.recalculate_locks[locking.LEVEL_NODE] |
7386 | 7389 |
else: |
7387 | 7390 |
self._LockInstancesNodes() |
7391 |
elif level == locking.LEVEL_NODE_RES: |
|
7392 |
# Copy node locks |
|
7393 |
self.needed_locks[locking.LEVEL_NODE_RES] = \ |
|
7394 |
self.needed_locks[locking.LEVEL_NODE][:] |
|
7388 | 7395 |
|
7389 | 7396 |
def BuildHooksEnv(self): |
7390 | 7397 |
"""Build hooks env. |
... | ... | |
7441 | 7448 |
self.needed_locks[locking.LEVEL_NODE] = [] |
7442 | 7449 |
self.recalculate_locks[locking.LEVEL_NODE] = constants.LOCKS_REPLACE |
7443 | 7450 |
|
7451 |
self.needed_locks[locking.LEVEL_NODE] = [] |
|
7452 |
self.recalculate_locks[locking.LEVEL_NODE] = constants.LOCKS_REPLACE |
|
7453 |
|
|
7444 | 7454 |
self._migrater = TLMigrateInstance(self, self.op.instance_name, |
7445 | 7455 |
cleanup=self.op.cleanup, |
7446 | 7456 |
failover=False, |
... | ... | |
7460 | 7470 |
del self.recalculate_locks[locking.LEVEL_NODE] |
7461 | 7471 |
else: |
7462 | 7472 |
self._LockInstancesNodes() |
7473 |
elif level == locking.LEVEL_NODE_RES: |
|
7474 |
# Copy node locks |
|
7475 |
self.needed_locks[locking.LEVEL_NODE_RES] = \ |
|
7476 |
self.needed_locks[locking.LEVEL_NODE][:] |
|
7463 | 7477 |
|
7464 | 7478 |
def BuildHooksEnv(self): |
7465 | 7479 |
"""Build hooks env. |
Also available in: Unified diff