Make QA turn on user-shutdown when testing it
authorHrvoje Ribicic <riba@google.com>
Wed, 19 Aug 2015 21:35:22 +0000 (23:35 +0200)
committerHrvoje Ribicic <riba@google.com>
Thu, 20 Aug 2015 12:25:39 +0000 (14:25 +0200)
Commit fe6287b4 made the --user-shutdown switch meaningful for Xen,
preventing USER_DOWN reporting if disabled. The QA turned this switch
on for KVM, where it is needed to start the specialized daemon, but
not for Xen. This patch fixes the discrepancy.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

qa/qa_instance.py

index 6cbe96e..490fec0 100644 (file)
@@ -1306,7 +1306,10 @@ def _TestInstanceUserDownXen(instance):
   primary = _GetInstanceField(instance.name, "pnode")
   fn = lambda: AssertCommand(["xm", "shutdown", "-w", instance.name],
                              node=primary)
+
+  AssertCommand(["gnt-cluster", "modify", "--user-shutdown=true"])
   _TestInstanceUserDown(instance, fn)
+  AssertCommand(["gnt-cluster", "modify", "--user-shutdown=false"])
 
 
 @InstanceCheck(INST_UP, INST_UP, FIRST_ARG)