Fix lock release in TLMigrateInstance
authorApollon Oikonomopoulos <apollon@noc.grnet.gr>
Tue, 10 May 2011 11:10:13 +0000 (14:10 +0300)
committerMichael Hanselmann <hansmi@google.com>
Tue, 10 May 2011 11:12:01 +0000 (13:12 +0200)
Commit 52f33103 introduced lock release factorization, replacing manual
lock release using utility functions. However, it broke
TLMigrateInstance due to a typo (passing the Tasklet to ReleaseLocks
instead of the parent LU). We fix this by passing the LU to
ReleaseLocks.

Thanks to Dan Eriksson for reporting this.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/cmdlib.py

index a0e11a5..0c24ecd 100644 (file)
@@ -6475,7 +6475,7 @@ class TLMigrateInstance(Tasklet):
       if len(self.lu.tasklets) == 1:
         # It is safe to release locks only when we're the only tasklet
         # in the LU
-        _ReleaseLocks(self, locking.LEVEL_NODE,
+        _ReleaseLocks(self.lu, locking.LEVEL_NODE,
                       keep=[instance.primary_node, self.target_node])
 
     else: