Commit 9513b6ab authored by Guido Trotter's avatar Guido Trotter
Browse files

_LockInstancesNodes: support append mode

This will be used to lock the instance's nodes in addition to some more.

Reviewed-by: iustinp
parent b2751b57
......@@ -298,7 +298,11 @@ class LogicalUnit(object):
if not primary_only:
self.needed_locks[locking.LEVEL_NODE] = wanted_nodes
if self.recalculate_locks[locking.LEVEL_NODE] == constants.LOCKS_REPLACE:
self.needed_locks[locking.LEVEL_NODE] = wanted_nodes
elif self.recalculate_locks[locking.LEVEL_NODE] == constants.LOCKS_APPEND:
del self.recalculate_locks[locking.LEVEL_NODE]
......@@ -190,6 +190,7 @@ REPLACE_DISK_ALL = "replace_all"
# lock recalculate mode
LOCKS_REPLACE = 'replace'
LOCKS_APPEND = 'append'
# instance creation modes
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