Revision c99200a3 qa/qa_rapi.py
b/qa/qa_rapi.py | ||
---|---|---|
759 | 759 |
|
760 | 760 |
|
761 | 761 |
def TestInterClusterInstanceMove(src_instance, dest_instance, |
762 |
pnode, snode, tnode):
|
|
762 |
inodes, tnode):
|
|
763 | 763 |
"""Test tools/move-instance""" |
764 | 764 |
master = qa_config.GetMasterNode() |
765 | 765 |
|
... | ... | |
772 | 772 |
|
773 | 773 |
# TODO: Run some instance tests before moving back |
774 | 774 |
|
775 |
if snode is None: |
|
775 |
if len(inodes) > 1: |
|
776 |
# No disk template currently requires more than 1 secondary node. If this |
|
777 |
# changes, either this test must be skipped or the script must be updated. |
|
778 |
assert len(inodes) == 2 |
|
779 |
snode = inodes[1] |
|
780 |
else: |
|
776 | 781 |
# instance is not redundant, but we still need to pass a node |
777 | 782 |
# (which will be ignored) |
778 |
fsec = tnode |
|
779 |
else: |
|
780 |
fsec = snode |
|
783 |
snode = tnode |
|
784 |
pnode = inodes[0] |
|
781 | 785 |
# note: pnode:snode are the *current* nodes, so we move it first to |
782 | 786 |
# tnode:pnode, then back to pnode:snode |
783 | 787 |
for si, di, pn, sn in [(src_instance["name"], dest_instance["name"], |
784 | 788 |
tnode["primary"], pnode["primary"]), |
785 | 789 |
(dest_instance["name"], src_instance["name"], |
786 |
pnode["primary"], fsec["primary"])]:
|
|
790 |
pnode["primary"], snode["primary"])]:
|
|
787 | 791 |
cmd = [ |
788 | 792 |
"../tools/move-instance", |
789 | 793 |
"--verbose", |
Also available in: Unified diff