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: Guido Trotter <[email protected]> --- qa/qa_instance.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qa/qa_instance.py b/qa/qa_instance.py index 6e3e107..1df3ed5 100644 --- a/qa/qa_instance.py +++ b/qa/qa_instance.py @@ -609,6 +609,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 @@ -621,7 +623,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]) -- 1.7.10.4
