Cluster-verify should report instances whose disk template is not
compatible with the exlusive storage setting.

Signed-off-by: Bernardo Dal Seno <[email protected]>
---
 qa/ganeti-qa.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py
index ea70e0a..4366aaa 100755
--- a/qa/ganeti-qa.py
+++ b/qa/ganeti-qa.py
@@ -476,6 +476,17 @@ def RunExclusiveStorageTests():
       qa_cluster.AssertClusterVerify()
       qa_instance.TestInstanceRemove(instance1)
       qa_instance.TestInstanceRemove(instance2)
+    if qa_config.TestEnabled("instance-add-drbd-disk"):
+      snode = qa_config.AcquireNode()
+      try:
+        qa_cluster.TestSetExclStorCluster(False)
+        instance = qa_instance.TestInstanceAddWithDrbdDisk(node, snode)
+        qa_cluster.TestSetExclStorCluster(True)
+        exp_err = [constants.CV_EINSTANCEUNSUITABLENODE]
+        qa_cluster.AssertClusterVerify(fail=True, errors=exp_err)
+        qa_instance.TestInstanceRemove(instance)
+      finally:
+        qa_config.ReleaseNode(snode)
     qa_cluster.TestSetExclStorCluster(False)
   finally:
     qa_config.ReleaseNode(node)
-- 
1.8.1

-- 
You received this message because you are subscribed to the Google Groups 
"ganeti-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to