Commit c7e54e1d authored by Agata Murawska's avatar Agata Murawska
Browse files

QA updated to test instance removing when sec. is offline



Added test checking that it is possible to remove an instance with drbd
disk when non-primary node is offline.
Signed-off-by: default avatarAgata Murawska <agatamurawska@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 03e5cdd5
......@@ -507,6 +507,18 @@ def RunQa():
finally:
qa_config.ReleaseNode(snode)
# Test removing instance with offline drbd secondary
if qa_config.TestEnabled("instance-remove-drbd-offline"):
snode = qa_config.AcquireNode(exclude=pnode)
instance = \
qa_instance.TestInstanceAddWithDrbdDisk(pnode, snode)
try:
qa_node.MakeNodeOffline(snode, "yes")
RunTest(qa_instance.TestInstanceRemove, instance)
finally:
qa_node.MakeNodeOffline(snode, "no")
qa_config.ReleaseNode(snode)
if qa_config.TestEnabled(["instance-add-plain-disk", "instance-export"]):
for shutdown in [False, True]:
instance = RunTest(qa_instance.TestInstanceAddWithPlainDisk, pnode)
......
......@@ -116,6 +116,7 @@
"instance-add-drbd-disk": true,
"instance-convert-disk": true,
"instance-plain-rapi-common-tests": true,
"instance-remove-drbd-offline": true,
"instance-export": true,
"instance-failover": true,
......
......@@ -58,6 +58,12 @@ def _NodeRemove(node):
node["_added"] = False
def MakeNodeOffline(node, value):
"""gnt-node modify --offline=value"""
# value in ["yes", "no"]
AssertCommand(["gnt-node", "modify", "--offline", value, node["primary"]])
def TestNodeAddAll():
"""Adding all nodes to cluster."""
master = qa_config.GetMasterNode()
......
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