Improve Xen instance state handling
authorHrvoje Ribicic <riba@google.com>
Tue, 17 Mar 2015 21:51:46 +0000 (21:51 +0000)
committerHrvoje Ribicic <riba@google.com>
Wed, 18 Mar 2015 17:11:46 +0000 (18:11 +0100)
commit9c6611ccf83808844ab7082e42a4807115621530
tree52928d980b50de7e0551435762b10b451ae81875
parent6e8f7fe5089f44336b0e2569337e4669464510e8
Improve Xen instance state handling

Xen's utilities used by Ganeti to report instance state can have
interesting quirks, such as reporting that an instance resides in
different and somewhat contradictory states.

This patch improves the situation by ignoring the paused state, and
encoding some of the more exotic combinations that may appear.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
lib/hypervisor/hv_xen.py
test/py/ganeti.hypervisor.hv_xen_unittest.py