Commit 6d96f116 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Guido Trotter
Browse files

Fix locking in LUNetworkConnect()



Locks for group instances are aquired only if conflicts are checked.
To this end we must _CheckNodeGroupInstances() only then otherwise
this check will always fail (owned_instances will be []).
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 076a2938
......@@ -16701,7 +16701,8 @@ class LUNetworkConnect(LogicalUnit):
 
# Check if locked instances are still correct
owned_instances = frozenset(self.owned_locks(locking.LEVEL_INSTANCE))
_CheckNodeGroupInstances(self.cfg, self.group_uuid, owned_instances)
if self.op.conflicts_check:
_CheckNodeGroupInstances(self.cfg, self.group_uuid, owned_instances)
 
self.netparams = {
constants.NIC_MODE: self.network_mode,
......
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