LUClusterRedistConf: Use node allocation lock
authorMichael Hanselmann <hansmi@google.com>
Fri, 23 Nov 2012 03:41:15 +0000 (04:41 +0100)
committerMichael Hanselmann <hansmi@google.com>
Wed, 5 Dec 2012 11:00:42 +0000 (12:00 +0100)
All node locks are acquired.

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

lib/cmdlib.py

index 3f80ae5..b36cab3 100644 (file)
@@ -4614,8 +4614,9 @@ class LUClusterRedistConf(NoHooksLU):
   def ExpandNames(self):
     self.needed_locks = {
       locking.LEVEL_NODE: locking.ALL_SET,
+      locking.LEVEL_NODE_ALLOC: locking.ALL_SET,
     }
-    self.share_locks[locking.LEVEL_NODE] = 1
+    self.share_locks = _ShareAll()
 
   def Exec(self, feedback_fn):
     """Redistribute the configuration.