cmdlib: Acquire BGL for LUClusterVerifyConfig
authorMichael Hanselmann <hansmi@google.com>
Tue, 7 Jun 2011 05:17:09 +0000 (07:17 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 8 Jun 2011 05:44:29 +0000 (07:44 +0200)
commitc5312a10fae803c1b5fba0cbe9494776ce800fef
treee7936bb31a12f37f3a81201d5e94555034af5b8e
parentfbb2c636bfc49134b90082759980de3423e8a22b
cmdlib: Acquire BGL for LUClusterVerifyConfig

LUClusterVerifyConfig verifies a number of configuration settings. For
doing so, it needs a consistent list of nodes, groups and instances. So
far no locks were acquired at all (except for the BGL in shared mode).
This is a race condition (e.g. if a node group is added in parallel) and
can be fixed by acquiring the BGL in exclusive mode. Since this LU
verifies the cluster-wide configuration, doing so instead of acquiring
individual locks is just.

Includes one typo fix and one docstring update.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
lib/cmdlib.py