Commit 52e9bef0 authored by Thomas Thrainer's avatar Thomas Thrainer
Browse files

Add gnt-node migrate to QA

Make it possible to optionally run gnt-node migrate during QA.
Signed-off-by: default avatarThomas Thrainer <>
Reviewed-by: default avatarKlaus Aehlig <>
parent 4d33e134
......@@ -503,6 +503,7 @@ def RunHardwareFailureTests(instance, inodes):
if len(inodes) >= 2:
RunTestIf("node-evacuate", qa_node.TestNodeEvacuate, inodes[0], inodes[1])
RunTestIf("node-failover", qa_node.TestNodeFailover, inodes[0], inodes[1])
RunTestIf("node-migrate", qa_node.TestNodeMigrate, inodes[0], inodes[1])
def RunExclusiveStorageTests():
......@@ -183,8 +183,9 @@
"node-modify": true,
"node-oob": true,
"# This test needs at least three nodes": null,
"# These tests need at least three nodes": null,
"node-evacuate": false,
"node-migrate": false,
"# This test needs at least two nodes": null,
"node-failover": false,
......@@ -201,6 +201,20 @@ def TestNodeFailover(node, node2):
AssertCommand(["gnt-node", "failover", "-f", node2.primary])
def TestNodeMigrate(node, node2):
"""gnt-node migrate"""
if qa_utils.GetNodeInstances(node2, secondaries=False):
raise qa_error.UnusableNodeError("Secondary node has at least one"
" primary instance. This test requires"
" it to have no primary instances.")
# Migrate to secondary node
AssertCommand(["gnt-node", "migrate", "-f", node.primary])
# ... and back again.
AssertCommand(["gnt-node", "migrate", "-f", node2.primary])
def TestNodeEvacuate(node, node2):
"""gnt-node evacuate"""
node3 = qa_config.AcquireNode(exclude=[node, node2])
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