Human readable group name improved
[ganeti-local] / qa / qa_cluster.py
index 77a78fb..1727098 100644 (file)
@@ -94,10 +94,11 @@ def TestClusterInit(rapi_user, rapi_secret):
     fh.close()
 
   # Initialize cluster
-  cmd = ["gnt-cluster", "init"]
-
-  cmd.append("--primary-ip-version=%d" %
-             qa_config.get("primary_ip_version", 4))
+  cmd = [
+    "gnt-cluster", "init",
+    "--primary-ip-version=%d" % qa_config.get("primary_ip_version", 4),
+    "--enabled-hypervisors=%s" % ",".join(qa_config.GetEnabledHypervisors()),
+    ]
 
   for spec_type in ("mem-size", "disk-size", "disk-count", "cpu-count",
                     "nic-count"):
@@ -115,10 +116,6 @@ def TestClusterInit(rapi_user, rapi_secret):
     cmd.append("--bridge=%s" % bridge)
     cmd.append("--master-netdev=%s" % bridge)
 
-  htype = qa_config.get("enabled-hypervisors", None)
-  if htype:
-    cmd.append("--enabled-hypervisors=%s" % htype)
-
   cmd.append(qa_config.get("name"))
   AssertCommand(cmd)
 
@@ -224,7 +221,8 @@ def TestClusterEpo():
   # All instances should have been stopped now
   result_output = GetCommandOutput(master["primary"],
                                    "gnt-instance list --no-headers -o status")
-  AssertEqual(compat.all(status == "ADMIN_down"
+  # ERROR_down because the instance is stopped but not recorded as such
+  AssertEqual(compat.all(status == "ERROR_down"
                          for status in result_output.splitlines()), True)
 
   # Now start everything again