From 0ee383bf93666e421539525f06f1c019914f2be6 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Tue, 27 Nov 2012 10:30:04 +0100
Subject: [PATCH] Fix build after commit 9b7e05a

Commit 9b7e05a didn't quite work as expected: glm.is_owned expects a
locking level, not a lock name.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
---
 lib/cmdlib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 94a1b9739..e472dac00 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -7623,7 +7623,7 @@ class LUInstanceRename(LogicalUnit):
     # Change the instance lock. This is definitely safe while we hold the BGL.
     # Otherwise the new lock would have to be added in acquired mode.
     assert self.REQ_BGL
-    assert self.glm.is_owned(locking.BGL)
+    assert locking.BGL in self.owned_locks(locking.LEVEL_CLUSTER)
     self.glm.remove(locking.LEVEL_INSTANCE, old_name)
     self.glm.add(locking.LEVEL_INSTANCE, self.op.new_name)
 
-- 
GitLab