Ensure that --wait-for-sync is used in QA
authorIustin Pop <iustin@google.com>
Thu, 5 Jul 2012 13:28:47 +0000 (15:28 +0200)
committerIustin Pop <iustin@google.com>
Thu, 5 Jul 2012 16:11:06 +0000 (18:11 +0200)
We don't have a specific test for activate disks, so let's add it in
the cases where we run (incidentally) activate-disks.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

qa/qa_instance.py

index 519e3ca..76eb5cf 100644 (file)
@@ -429,6 +429,8 @@ def TestReplaceDisks(instance, pnode, snode, othernode):
   AssertCommand(["gnt-instance", "stop", instance["name"]])
   AssertCommand(buildcmd(["-a"]), fail=True)
   AssertCommand(["gnt-instance", "activate-disks", instance["name"]])
+  AssertCommand(["gnt-instance", "activate-disks", "--wait-for-sync",
+                 instance["name"]])
   AssertCommand(buildcmd(["-a"]))
   AssertCommand(["gnt-instance", "start", instance["name"]])
 
@@ -451,6 +453,8 @@ def _AssertRecreateDisks(cmdargs, instance, fail=False, check=True,
   if not fail and check:
     # Quick check that the disks are there
     AssertCommand(["gnt-instance", "activate-disks", instance["name"]])
+    AssertCommand(["gnt-instance", "activate-disks", "--wait-for-sync",
+                   instance["name"]])
     AssertCommand(["gnt-instance", "deactivate-disks", instance["name"]])