Commit 849da276 authored by Guido Trotter's avatar Guido Trotter
Browse files

LURebootInstance: lock only primary when possible

When rebooting an instance and we're not changing it's disks status (all
the cases except in a "full" reboot) we can lock just its primary node.

Reviewed-by: iustinp
parent a82ce292
......@@ -2113,8 +2113,8 @@ class LURebootInstance(LogicalUnit):
def DeclareLocks(self, level):
if level == locking.LEVEL_NODE:
# FIXME: lock only primary on (not constants.INSTANCE_REBOOT_FULL)
primary_only = not constants.INSTANCE_REBOOT_FULL
def BuildHooksEnv(self):
"""Build hooks env.
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