Skip to content
Snippets Groups Projects
user avatar
Mark Goddard authored
A common failure early on when using Kayobe is during discovery of SSH
known hosts. This happens if a host does not have an IP address
configured on the admin (SSH) network. The failure looks like this:

PLAY [Ensure known hosts are configured]
**********************************************************************
TASK [ssh-known-host : Scan for SSH keys]
**********************************************************************
failed: [compute0 -> localhost] (item=) => {"ansible_loop_var": "item",
    "changed": false, "cmd": ["ssh-keyscan"], "delta": "0:00:00.013855",
    "end": "2020-04-17 10:51:01.857855", "item": "", "msg": "non-zero
        return code", "rc": 1, "start": "2020-04-17 10:51:01.844000",
    "stderr": "usage: ssh-keyscan [-46cDHv] [-f file] [-p port] [-T
        timeout] [-t type]\n\t\t   [host | addrlist namelist]",
    "stderr_lines": ["u sage: ssh-keyscan [-46cDHv] [-f file] [-p port]
        [-T timeout] [-t type]", "\t\t   [host | addrlist namelist]"],
        "stdout": "", "stdout_lines": []}

This happens when ansible_host is an empty string, typically because the
host has no IP address defined in for the admin network in
network-allocation.yml. This is very confusing for a new user. We should
provide a more informative message.

It's not exactly clear how a user gets to this point, since the
ip-allocation.yml playbook runs before ssh-known-host.yml, which should
populate network-allocation.yml.

This change detects this failure mode and provides a message with
information about how to resolve it.

Change-Id: I564b6e4509a30dec7c49a23bb2f75d490be775ed
Story: 2007566
Task: 39456
78909146
History
Name Last commit Last update
..
filter_plugins
group_vars
roles
test_plugins
baremetal-compute-inspect.yml
baremetal-compute-manage.yml
baremetal-compute-provide.yml
baremetal-compute-rename.yml
baremetal-compute-serial-console-post-config.yml
baremetal-compute-serial-console.yml
bootstrap.yml
compute-node-discovery.yml
compute-node-provide.yml
container-image-build.yml
container-image-builders-check.yml
dell-compute-node-boot-mode.yml
dell-compute-node-discovery.yml
dell-compute-node-inventory.yml
dell-switch-bmp.yml
dev-tools.yml
disable-cloud-init.yml
disable-glean.yml
disable-selinux.yml
dnf.yml
docker-devicemapper.yml
docker-registry.yml
docker.yml
drac-bios.yml
drac-boot-order.yml
drac-facts.yml
dump-config.yml
external-net.yml
host-command-run.yml
host-package-update.yml
idrac-bootstrap-one.yml
idrac-bootstrap.yml
inspection-store.yml
ip-allocation.yml
ip-routing.yml
kayobe-ansible-user.yml
kayobe-target-venv.yml
kolla-ansible.yml
kolla-bifrost-hostvars.yml
kolla-bifrost.yml
kolla-build.yml
kolla-host.yml
kolla-openstack.yml
kolla-target-venv.yml
lvm.yml
mdadm.yml
network-connectivity.yml
network.yml
ntp.yml
opensm.yml
overcloud-bios-raid.yml
overcloud-deprovision.yml
overcloud-docker-sdk-upgrade.yml
overcloud-etc-hosts-fixup.yml
overcloud-extras.yml
overcloud-grafana-configure.yml
overcloud-hardware-inspect.yml
overcloud-host-image-workaround-cloud-init.yml
overcloud-host-image-workaround-resolv.yml
overcloud-introspection-data-save.yml
overcloud-introspection-rules-dell-lldp-workaround.yml
overcloud-introspection-rules.yml
overcloud-inventory-discover.yml
overcloud-ipa-build.yml
overcloud-ipa-images.yml
overcloud-provision.yml
overcloud-service-config-save.yml
physical-network.yml
pip.yml
provision-net.yml
public-openrc.yml
seed-hypervisor-libvirt-host.yml
seed-introspection-rules.yml
seed-ipa-build.yml
seed-service-upgrade-prep.yml
seed-vm-deprovision.yml
seed-vm-provision.yml
snat.yml
ssh-known-host.yml
swift-block-devices.yml
swift-rings.yml
sysctl.yml
users.yml
wipe-disks.yml
yum.yml