From: Guido Trotter Date: Tue, 9 Sep 2008 10:42:03 +0000 (+0000) Subject: Parallelize LUVerify{Cluster,Disks} X-Git-Tag: v2.0.0alpha0~35 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/d4b9d97fc78c0a2a02653ec5e8cda302a9b9699f?hp=efd990e4d442847c4e0557d8d311ee5ee99993c1 Parallelize LUVerify{Cluster,Disks} These are two easy querying LUs which require shared access to all nodes/instances. Reviewed-by: iustinp --- diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 3f150e7..77900f0 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -498,6 +498,14 @@ class LUVerifyCluster(LogicalUnit): HPATH = "cluster-verify" HTYPE = constants.HTYPE_CLUSTER _OP_REQP = ["skip_checks"] + REQ_BGL = False + + def ExpandNames(self): + self.needed_locks = { + locking.LEVEL_NODE: locking.ALL_SET, + locking.LEVEL_INSTANCE: locking.ALL_SET, + } + self.share_locks = dict(((i, 1) for i in locking.LEVELS)) def _VerifyNode(self, node, file_list, local_cksum, vglist, node_result, remote_version, feedback_fn): @@ -912,6 +920,14 @@ class LUVerifyDisks(NoHooksLU): """ _OP_REQP = [] + REQ_BGL = False + + def ExpandNames(self): + self.needed_locks = { + locking.LEVEL_NODE: locking.ALL_SET, + locking.LEVEL_INSTANCE: locking.ALL_SET, + } + self.share_locks = dict(((i, 1) for i in locking.LEVELS)) def CheckPrereq(self): """Check prerequisites.