Skip to content
Snippets Groups Projects
Commit 76f59a32 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Forward-port: Fix two problems in QA scripts

- Failover back to original node in instance failure test
- Exclude secondary node from list of potential nodes in
  replace-disks test

Reviewed-by: iustinp
parent 8a4e8898
No related branches found
No related tags found
No related merge requests found
...@@ -211,7 +211,7 @@ def RunHardwareFailureTests(instance, pnode, snode): ...@@ -211,7 +211,7 @@ def RunHardwareFailureTests(instance, pnode, snode):
RunTest(qa_instance.TestInstanceFailover, instance) RunTest(qa_instance.TestInstanceFailover, instance)
if qa_config.TestEnabled('instance-replace-disks'): if qa_config.TestEnabled('instance-replace-disks'):
othernode = qa_config.AcquireNode(exclude=pnode) othernode = qa_config.AcquireNode(exclude=[pnode, snode])
try: try:
RunTest(qa_instance.TestReplaceDisks, RunTest(qa_instance.TestReplaceDisks,
instance, pnode, snode, othernode) instance, pnode, snode, othernode)
......
...@@ -142,6 +142,11 @@ def TestInstanceFailover(instance): ...@@ -142,6 +142,11 @@ def TestInstanceFailover(instance):
AssertEqual(StartSSH(master['primary'], AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0) utils.ShellQuoteArgs(cmd)).wait(), 0)
# ... and back
cmd = ['gnt-instance', 'failover', '--force', instance['name']]
AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-info') @qa_utils.DefineHook('instance-info')
def TestInstanceInfo(instance): def TestInstanceInfo(instance):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment