Fix a type issue and bad logic in cluster verification
authorIustin Pop <iustin@google.com>
Thu, 31 May 2012 15:00:37 +0000 (17:00 +0200)
committerIustin Pop <iustin@google.com>
Fri, 1 Jun 2012 15:12:26 +0000 (17:12 +0200)
commite375fb613ccd3fb6d7d0fdc335648e298bd1e40e
tree65d7260b3c17163b57031234cc819645489580c4
parent4b5a9365682f43b4eebe1e797c05d00659f28c59
Fix a type issue and bad logic in cluster verification

Commit 2e04d454 introduced the new offline state for the instance
state, but being a big monolithic patch it sneaked in something that
doesn't make sense.

The checks for extra instances (either wrongly up or just unknown) are
done purely on a name-basis, not on objects, so the types there are
wrong. Furthermore, they have no relation to the admin state of the
instance, so we just drop the entire if block. We keep the increment
of the offline instance count, but move it to a different loop over
instances.

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