Commit 21e2734f authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

QA: Cluster-verify reports shared PVs with exclusive storage

Exclusive storage forbids sharing PVs between unrelated LVs. This is a test
that cluster-verify correctly report such cases.
Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 23610ff8
......@@ -468,6 +468,8 @@ def RunExclusiveStorageTests():
if qa_config.TestEnabled("instance-add-plain-disk"):
# Make sure that the cluster doesn't have any pre-existing problem
......@@ -674,3 +674,21 @@ def TestExclStorSingleNode(node):
AssertClusterVerify(fail=True, errors=[constants.CV_EGROUPMIXEDESFLAG])
AssertCommand(_BuildSetESCmd("default", node_name))
def TestExclStorSharedPv(node):
"""cluster-verify reports LVs that share the same PV with exclusive_storage.
vgname = qa_config.get("vg-name", constants.DEFAULT_VG)
lvname1 = _QA_LV_PREFIX + "vol1"
lvname2 = _QA_LV_PREFIX + "vol2"
node_name = node["primary"]
AssertCommand(["lvcreate", "-L1G", "-n", lvname1, vgname], node=node_name)
AssertClusterVerify(fail=True, errors=[constants.CV_ENODEORPHANLV])
AssertCommand(["lvcreate", "-L1G", "-n", lvname2, vgname], node=node_name)
AssertClusterVerify(fail=True, errors=[constants.CV_ENODELVM,
AssertCommand(["lvremove", "-f", "/".join([vgname, lvname1])], node=node_name)
AssertCommand(["lvremove", "-f", "/".join([vgname, lvname2])], node=node_name)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment