Use SSH_LOGIN_USER rather than root for xl ssh
authorGuido Trotter <ultrotter@google.com>
Tue, 6 Nov 2012 17:52:59 +0000 (18:52 +0100)
committerGuido Trotter <ultrotter@google.com>
Tue, 6 Nov 2012 18:01:30 +0000 (19:01 +0100)
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/constants.py

index ec5edd5..5bcccd9 100644 (file)
@@ -202,10 +202,11 @@ XEN_CMD = _autoconf.XEN_CMD
 # the command xl runs some extra info so that it can use Ganeti's key
 # verification and not fail. Note that this string is incomplete: it must be
 # filled with the cluster name before being used.
-XL_SSH_CMD = ("ssh -l root -oGlobalKnownHostsFile=%s"
+XL_SSH_CMD = ("ssh -l %s -oGlobalKnownHostsFile=%s"
               " -oUserKnownHostsFile=/dev/null"
               " -oCheckHostIp=no -oStrictHostKeyChecking=yes"
-              " -oHostKeyAlias=%%s") % pathutils.SSH_KNOWN_HOSTS_FILE
+              " -oHostKeyAlias=%%s") % (SSH_LOGIN_USER,
+                                        pathutils.SSH_KNOWN_HOSTS_FILE)
 
 KVM_PATH = _autoconf.KVM_PATH
 KVM_KERNEL = _autoconf.KVM_KERNEL