Retrieving tags can be done while the lock is shared. Only writing
needs to be exclusive.
Also add a FIXME for cluster tags, where the code currently doesn't
use any locks except the config lock.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
self.op.name = _ExpandInstanceName(self.cfg, self.op.name)
self.needed_locks[locking.LEVEL_INSTANCE] = self.op.name
+ # FIXME: Acquire BGL for cluster tag operations (as of this writing it's
+ # not possible to acquire the BGL based on opcode parameters)
+
def CheckPrereq(self):
"""Check prerequisites.
]
REQ_BGL = False
+ def ExpandNames(self):
+ TagsLU.ExpandNames(self)
+
+ # Share locks as this is only a read operation
+ self.share_locks = dict.fromkeys(locking.LEVELS, 1)
+
def Exec(self, feedback_fn):
"""Returns the tag list.