Exclusive storage forbids sharing PVs between unrealted LVs. This is a test that cluster-verify correctly report such cases.
Signed-off-by: Bernardo Dal Seno <[email protected]> --- qa/ganeti-qa.py | 2 ++ qa/qa_cluster.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py index 4366aaa..267fdde 100755 --- a/qa/ganeti-qa.py +++ b/qa/ganeti-qa.py @@ -467,6 +467,8 @@ def RunExclusiveStorageTests(): qa_cluster.TestExclStorSingleNode(node) qa_cluster.TestSetExclStorCluster(True) + qa_cluster.TestExclStorSharedPv(node) + if qa_config.TestEnabled("instance-add-plain-disk"): # Make sure that the cluster doesn't have any pre-existing problem qa_cluster.AssertClusterVerify() diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py index a91e51e..407e06b 100644 --- a/qa/qa_cluster.py +++ b/qa/qa_cluster.py @@ -663,3 +663,18 @@ def TestExclStorSingleNode(node): AssertClusterVerify(fail=True, errors=[constants.CV_EGROUPMIXEDESFLAG]) AssertCommand(_BuildSetESCmd("default", node_name)) AssertClusterVerify() + + +def TestExclStorSharedPv(node): + """cluster-verify reports LVs that share the same PV with exclusive_storage. + + """ + node_name = node["primary"] + AssertCommand(["lvcreate", "-L1G", "-nqa-vol0", "xenvg"], node=node_name) + AssertClusterVerify(fail=True, errors=[constants.CV_ENODEORPHANLV]) + AssertCommand(["lvcreate", "-L1G", "-nqa-vol1", "xenvg"], node=node_name) + AssertClusterVerify(fail=True, errors=[constants.CV_ENODELVM, + constants.CV_ENODEORPHANLV]) + AssertCommand(["lvremove", "-f", "xenvg/qa-vol0"], node=node_name) + AssertCommand(["lvremove", "-f", "xenvg/qa-vol1"], node=node_name) + AssertClusterVerify() -- 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.
