From d9d9e0d99c3058fd26394936dffa7d15c3693531 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Mon, 14 Nov 2011 14:12:08 +0100
Subject: [PATCH] LUNodeQueryvols: Acquire all locks in shared mode

Nothing is being written to.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/cmdlib.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 9b0380100..2da4ace4f 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4614,8 +4614,9 @@ class LUNodeQueryvols(NoHooksLU):
                        selected=self.op.output_fields)
 
   def ExpandNames(self):
+    self.share_locks = _ShareAll()
     self.needed_locks = {}
-    self.share_locks[locking.LEVEL_NODE] = 1
+
     if not self.op.nodes:
       self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET
     else:
-- 
GitLab