Fix bug introduced in commit 0d5a0b96
authorMichael Hanselmann <hansmi@google.com>
Tue, 10 May 2011 12:02:15 +0000 (14:02 +0200)
committerMichael Hanselmann <hansmi@google.com>
Tue, 10 May 2011 12:20:01 +0000 (14:20 +0200)
When removing “acquired_locks” in commit 0d5a0b96, I didn't remember
that it does not contain the Big Ganeti Lock.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/cmdlib.py

index 0c24ecd..1619ff5 100644 (file)
@@ -3671,7 +3671,8 @@ class _OsQuery(_QueryBase):
     """
     # Locking is not used
     assert not (compat.any(lu.glm.is_owned(level)
-                           for level in locking.LEVELS) or
+                           for level in locking.LEVELS
+                           if level != locking.LEVEL_CLUSTER) or
                 self.do_locking or self.use_locking)
 
     valid_nodes = [node.name