From 32da72f303cc4ee1f393aa7ee31324fe63625568 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 5 Jul 2012 15:28:47 +0200
Subject: [PATCH] Ensure that --wait-for-sync is used in QA
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qa/qa_instance.py b/qa/qa_instance.py
index 519e3ca95..76eb5cf0b 100644
--- a/qa/qa_instance.py
+++ b/qa/qa_instance.py
@@ -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"]])
 
 
-- 
GitLab