LUClusterVerifyGroup: Use node allocation lock
authorMichael Hanselmann <hansmi@google.com>
Fri, 23 Nov 2012 03:39:20 +0000 (04:39 +0100)
committerMichael Hanselmann <hansmi@google.com>
Wed, 5 Dec 2012 11:00:29 +0000 (12:00 +0100)
See comment in code.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

lib/cmdlib.py

index 253a703..92b881d 100644 (file)
@@ -2233,6 +2233,11 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
       locking.LEVEL_INSTANCE: inst_names,
       locking.LEVEL_NODEGROUP: [self.group_uuid],
       locking.LEVEL_NODE: [],
+
+      # This opcode is run by watcher every five minutes and acquires all nodes
+      # for a group. It doesn't run for a long time, so it's better to acquire
+      # the node allocation lock as well.
+      locking.LEVEL_NODE_ALLOC: locking.ALL_SET,
       }
 
     self.share_locks = _ShareAll()