From 642339cfe809094985c6e56c6f38e6fad4128bb9 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 22 Jul 2008 14:24:19 +0000
Subject: [PATCH] Convert two (simple) LUs to be concurrent

LUQueryClusterInfo and LUDumpClusterConfig can be made concurrent and
don't need to acquire any locks. In fact they don't interact with the
cluster at all, but just with its configuration, which is thread-safe by
design.

Reviewed-by: iustinp
---
 lib/cmdlib.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 635dbcbdb..49a557ca7 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -1740,6 +1740,10 @@ class LUQueryClusterInfo(NoHooksLU):
   """
   _OP_REQP = []
   REQ_MASTER = False
+  REQ_BGL = False
+
+  def ExpandNames(self):
+    self.needed_locks = {}
 
   def CheckPrereq(self):
     """No prerequsites needed for this LU.
@@ -1771,6 +1775,10 @@ class LUDumpClusterConfig(NoHooksLU):
 
   """
   _OP_REQP = []
+  REQ_BGL = False
+
+  def ExpandNames(self):
+    self.needed_locks = {}
 
   def CheckPrereq(self):
     """No prerequisites.
-- 
GitLab