qa: fix TestInstanceModifyPrimaryAndBack flakiness
authorGuido Trotter <ultrotter@google.com>
Wed, 10 Apr 2013 18:23:17 +0000 (14:23 -0400)
committerGuido Trotter <ultrotter@google.com>
Wed, 10 Apr 2013 18:28:14 +0000 (14:28 -0400)
The test tries to scp the instance disks from the primary node to the
new destination, but connects to the master node instead. Thus it works
only when the primary node is the master node. Fixing by correcting to
the right node.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

qa/qa_instance.py

index 14bdf2c..37c12c5 100644 (file)
@@ -636,7 +636,7 @@ def TestInstanceModifyPrimaryAndBack(instance, currentnode, othernode):
                  pathutils.SSH_KNOWN_HOSTS_FILE,
                  "-oCheckHostIp=no", "-oStrictHostKeyChecking=yes",
                  "-oHashKnownHosts=no", "-oHostKeyAlias=%s" % cluster_name,
-                 "-r", disk, "%s:%s" % (other, filestorage)])
+                 "-r", disk, "%s:%s" % (other, filestorage)], node=current)
   AssertCommand(["gnt-instance", "modify", "--new-primary=%s" % other, name])
   AssertCommand(["gnt-instance", "startup", name])