diff --git a/lib/config.py b/lib/config.py
index 3234ee174aed499e9486f1c425e277e9cf1740b8..a639fd8782ec4b2b8986ef3c8d69fbf200e056fe 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -969,8 +969,7 @@ class ConfigWriter:
     self._config_data.cluster.serial_no += 1
     self._WriteConfig()
 
-  @locking.ssynchronized(_config_lock, shared=1)
-  def LookupNodeGroup(self, target):
+  def _UnlockedLookupNodeGroup(self, target):
     """Lookup a node group's UUID.
 
     @type target: string or None
@@ -994,6 +993,20 @@ class ConfigWriter:
     raise errors.OpPrereqError("Node group '%s' not found" % target,
                                errors.ECODE_NOENT)
 
+  @locking.ssynchronized(_config_lock, shared=1)
+  def LookupNodeGroup(self, target):
+    """Lookup a node group's UUID.
+
+    This function is just a wrapper over L{_UnlockedLookupNodeGroup}.
+
+    @type target: string or None
+    @param target: group name or UUID or None to look for the default
+    @rtype: string
+    @return: nodegroup UUID
+
+    """
+    return self._UnlockedLookupNodeGroup(target)
+
   def _UnlockedGetNodeGroup(self, uuid):
     """Lookup a node group.