LUNodeSetParams: Lock affected instances only
authorMichael Hanselmann <hansmi@google.com>
Wed, 2 Nov 2011 19:13:58 +0000 (20:13 +0100)
committerMichael Hanselmann <hansmi@google.com>
Mon, 7 Nov 2011 17:32:49 +0000 (18:32 +0100)
commitcc19798f6c9f6295cc805f506aaa3214ae31beb6
tree572742d42cca22eee95c903f6001adbe58ad065d
parent212a7fcd135cef1833753735126ec9e168a4684e
LUNodeSetParams: Lock affected instances only

Until now LUNodeSetParams would lock all instances if a node's
secondary IP address was to be changed and would then release
all instances it didn't actually need. With this patch the LU
optimistically locks instances and, once it got the locks,
checks whether they're still correct. This is similar to how
node group locking is done.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/cmdlib.py
lib/config.py