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"):
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)
# 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