Commit 5d1ab3a6 authored by Guido Trotter's avatar Guido Trotter
Browse files

Instance startup: lock primary node

This will be used to balloon other instances on the node if needed.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 945a7e67
......@@ -6482,6 +6482,11 @@ class LUInstanceStartup(LogicalUnit):
def ExpandNames(self):
self.recalculate_locks[locking.LEVEL_NODE_RES] = constants.LOCKS_REPLACE
def DeclareLocks(self, level):
if level == locking.LEVEL_NODE_RES:
self._LockInstancesNodes(primary_only=True, level=locking.LEVEL_NODE_RES)
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