From 8f4a22e3d41d832134727c99203af8d29e15c6cf Mon Sep 17 00:00:00 2001 From: Dimitris Aragiorgis <dimara@grnet.gr> Date: Wed, 24 Oct 2012 16:27:49 +0300 Subject: [PATCH] Fix a bug in LUNetworkAdd concering needed_locks Fix network client to pass conflicts_check to the opcode. Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr> --- lib/client/gnt_network.py | 1 + lib/cmdlib.py | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/client/gnt_network.py b/lib/client/gnt_network.py index 7be673780..fdadc6840 100644 --- a/lib/client/gnt_network.py +++ b/lib/client/gnt_network.py @@ -69,6 +69,7 @@ def AddNetwork(opts, args): mac_prefix=opts.mac_prefix, network_type=opts.network_type, add_reserved_ips=_HandleReservedIPs(opts.add_reserved_ips), + conflicts_check=opts.conflicts_check, tags=tags) SubmitOpCode(op, opts=opts) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 9522f35ea..d4cb88a53 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -15568,6 +15568,7 @@ class LUNetworkAdd(LogicalUnit): def ExpandNames(self): self.network_uuid = self.cfg.GenerateUniqueID(self.proc.GetECId()) + self.needed_locks = {} if self.op.conflicts_check: self.needed_locks = { locking.LEVEL_NODE: locking.ALL_SET, -- GitLab