Commit 049a6c6b authored by Guido Trotter's avatar Guido Trotter

qa: pass some extra options to make scp work

scp by itself won't work on a cluster: a few extra options are needed to
tell it where to find the "right" ssh global known hosts file managed by
Ganeti.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
parent 0b85e1bd
......@@ -607,6 +607,8 @@ def TestInstanceModifyPrimaryAndBack(instance, currentnode, othernode):
print qa_utils.FormatInfo("Test only supported for the file disk template")
return
cluster_name = qa_config.get("name")
name = instance.name
current = currentnode.primary
other = othernode.primary
......@@ -619,7 +621,11 @@ def TestInstanceModifyPrimaryAndBack(instance, currentnode, othernode):
AssertCommand(["gnt-instance", "modify", "--new-primary=%s" % other, name],
fail=True)
AssertCommand(["gnt-instance", "shutdown", name])
AssertCommand(["scp", "-r", disk, "%s:%s" % (other, filestorage)])
AssertCommand(["scp", "-oGlobalKnownHostsFile=%s" %
pathutils.SSH_KNOWN_HOSTS_FILE,
"-oCheckHostIp=no", "-oStrictHostKeyChecking=yes",
"-oHashKnownHosts=no", "-oHostKeyAlias=%s" % cluster_name,
"-r", disk, "%s:%s" % (other, filestorage)])
AssertCommand(["gnt-instance", "modify", "--new-primary=%s" % other, name])
AssertCommand(["gnt-instance", "startup", name])
......
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