Fix acquisition of node lock in LUInstanceGrowDisk
authorConstantinos Venetsanopoulos <cven@grnet.gr>
Wed, 11 Jan 2012 15:03:18 +0000 (17:03 +0200)
committerIustin Pop <iustin@google.com>
Thu, 12 Jan 2012 12:31:04 +0000 (13:31 +0100)
Ensure node level locks are recalculated properly
in LUInstanceGrowDisk.

Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/cmdlib.py

index 3e86e48..6f90043 100644 (file)
@@ -11242,6 +11242,7 @@ class LUInstanceGrowDisk(LogicalUnit):
     self._ExpandAndLockInstance()
     self.needed_locks[locking.LEVEL_NODE] = []
     self.needed_locks[locking.LEVEL_NODE_RES] = []
+    self.recalculate_locks[locking.LEVEL_NODE] = constants.LOCKS_REPLACE
     self.recalculate_locks[locking.LEVEL_NODE_RES] = constants.LOCKS_REPLACE
 
   def DeclareLocks(self, level):