Commit 0511ce91 authored by Michele Tartara's avatar Michele Tartara
Browse files

Non-Xen support for monitoring QA

The QA tests the Xen instance status collector, but that is expected to fail
when run on machines that do not use Xen.
Signed-off-by: default avatarMichele Tartara <>
Reviewed-by: default avatarGuido Trotter <>
parent a5877534
......@@ -24,8 +24,10 @@
from ganeti import _autoconf
from ganeti import constants
import qa_config
import qa_utils
from qa_utils import AssertCommand
from qa_instance_utils import CreateInstanceByDiskTemplate, \
......@@ -38,8 +40,13 @@ def TestInstStatusCollector():
"""Test the Xen instance status collector.
enabled_hypervisors = qa_config.GetEnabledHypervisors()
is_xen = (constants.HT_XEN_PVM in enabled_hypervisors or
constants.HT_XEN_HVM in enabled_hypervisors)
fail = not is_xen
# Execute on master on an empty cluster
AssertCommand([MON_COLLECTOR, "inst-status-xen"])
AssertCommand([MON_COLLECTOR, "inst-status-xen"], fail=fail)
#Execute on cluster with instances
node1 = qa_config.AcquireNode()
......@@ -47,8 +54,8 @@ def TestInstStatusCollector():
template = qa_config.GetDefaultDiskTemplate()
instance = CreateInstanceByDiskTemplate([node1, node2], template)
AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node1)
AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node2)
AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node1, fail=fail)
AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node2, fail=fail)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment