Improve LUQueryNodes for lockless case
authorIustin Pop <iustin@google.com>
Mon, 14 Dec 2009 15:26:48 +0000 (16:26 +0100)
committerIustin Pop <iustin@google.com>
Mon, 14 Dec 2009 15:34:13 +0000 (16:34 +0100)
commit4dfd62661512563329e80bd5600714fab4e4f41f
tree005d5f8e66e2fcfaa5d02fba82a3b7eb90d39c7c
parent77220dd2640139f188bae4220d54025fa61467f2
Improve LUQueryNodes for lockless case

In most uses of LUQueryNodes, we don't take a lock. This means that the
instance data is not protected across GetInstanceList and
GetInstanceInfo, and this can lead to instances not existing anymore.

Switching to GetAllInstanceInfo means that we get a single,
semi-consistent snapshot (since instances can still be modified, but
it's much better).

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