Revision 9513b6ab
b/lib/cmdlib.py | ||
---|---|---|
298 | 298 |
wanted_nodes.append(instance.primary_node) |
299 | 299 |
if not primary_only: |
300 | 300 |
wanted_nodes.extend(instance.secondary_nodes) |
301 |
self.needed_locks[locking.LEVEL_NODE] = wanted_nodes |
|
301 |
|
|
302 |
if self.recalculate_locks[locking.LEVEL_NODE] == constants.LOCKS_REPLACE: |
|
303 |
self.needed_locks[locking.LEVEL_NODE] = wanted_nodes |
|
304 |
elif self.recalculate_locks[locking.LEVEL_NODE] == constants.LOCKS_APPEND: |
|
305 |
self.needed_locks[locking.LEVEL_NODE].extend(wanted_nodes) |
|
302 | 306 |
|
303 | 307 |
del self.recalculate_locks[locking.LEVEL_NODE] |
304 | 308 |
|
b/lib/constants.py | ||
---|---|---|
190 | 190 |
|
191 | 191 |
# lock recalculate mode |
192 | 192 |
LOCKS_REPLACE = 'replace' |
193 |
LOCKS_APPEND = 'append' |
|
193 | 194 |
|
194 | 195 |
# instance creation modes |
195 | 196 |
INSTANCE_CREATE = "create" |
Also available in: Unified diff