Revision 053c356a
b/lib/constants.py | ||
---|---|---|
272 | 272 |
XEN_CMD_XL = "xl" |
273 | 273 |
# FIXME: This will be made configurable using hvparams in Ganeti 2.7 |
274 | 274 |
XEN_CMD = _autoconf.XEN_CMD |
275 |
# When the Xen toolstack used is "xl", live migration requires the source host |
|
276 |
# to connect to the target host via ssh (xl runs this command). We need to pass |
|
277 |
# the command xl runs some extra info so that it can use Ganeti's key |
|
278 |
# verification and not fail. Note that this string is incomplete: it must be |
|
279 |
# filled with the cluster name before being used. |
|
280 |
XL_SSH_CMD = ("ssh -l root -oGlobalKnownHostsFile=%s" |
|
281 |
" -oUserKnownHostsFile=/dev/null" |
|
282 |
" -oCheckHostIp=no -oStrictHostKeyChecking=yes" |
|
283 |
" -oHostKeyAlias=%%s") % SSH_KNOWN_HOSTS_FILE |
|
275 | 284 |
|
276 | 285 |
KVM_PATH = _autoconf.KVM_PATH |
277 | 286 |
KVM_KERNEL = _autoconf.KVM_KERNEL |
b/lib/hypervisor/hv_xen.py | ||
---|---|---|
32 | 32 |
from ganeti.hypervisor import hv_base |
33 | 33 |
from ganeti import netutils |
34 | 34 |
from ganeti import objects |
35 |
from ganeti import ssconf |
|
35 | 36 |
|
36 | 37 |
|
37 | 38 |
XEND_CONFIG_FILE = "/etc/xen/xend-config.sxp" |
... | ... | |
546 | 547 |
if live: |
547 | 548 |
args.append("-l") |
548 | 549 |
elif constants.XEN_CMD == constants.XEN_CMD_XL: |
550 |
cluster_name = ssconf.SimpleStore().GetClusterName() |
|
551 |
args.extend(["-s", constants.XL_SSH_CMD % cluster_name]) |
|
549 | 552 |
args.extend(["-C", self._ConfigFileName(instance.name)]) |
550 | 553 |
else: |
551 | 554 |
raise errors.HypervisorError("Unsupported xen command: %s" % |
Also available in: Unified diff