Make LUNetworkAdd pass _VerifyLocks()
authorDimitris Aragiorgis <dimara@grnet.gr>
Tue, 18 Dec 2012 09:23:27 +0000 (11:23 +0200)
committerMichael Hanselmann <hansmi@google.com>
Tue, 18 Dec 2012 12:07:17 +0000 (13:07 +0100)
LEVEL_NODE_ALLOC should be aquired too if LEVEL_NODE is ALL_SET.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/cmdlib.py

index 49617fd..1021912 100644 (file)
@@ -15763,8 +15763,10 @@ class LUNetworkAdd(LogicalUnit):
 
     if self.op.conflicts_check:
       self.share_locks[locking.LEVEL_NODE] = 1
+      self.share_locks[locking.LEVEL_NODE_ALLOC] = 1
       self.needed_locks = {
         locking.LEVEL_NODE: locking.ALL_SET,
+        locking.LEVEL_NODE_ALLOC: locking.ALL_SET,
         }
     else:
       self.needed_locks = {}