Comment 2 for bug 1847141

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/687305
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=162e3a00069d9e1aba1487eda8427ab3f45aac77
Submitter: Zuul
Branch: master

commit 162e3a00069d9e1aba1487eda8427ab3f45aac77
Author: Harald Jensås <email address hidden>
Date: Mon Oct 7 21:07:02 2019 +0200

    Get undercloud name in get_undercloud_registry()

    With IPv6 the netifaces.ifaddresses does not always
    return the local_ip of the undercloud as the first
    address. Simply picking the first address in the list
    of netifaces.AF_INET6 addresses does not always work.

    Also, for Docker/Podman using an IPv6 address in a
    docker reference is invalid. A name must be used:
      https://github.com/containers/libpod/issues/3516

    This change uses socket.gethostname() to find the
    hostname and then does a lookup in /etc/hosts using
    'getent hosts <shortname>.ctlplane'. If the entry exist
    the fqdn in the hosts entry is used.

    Related-Bug: #1836578
    Closes-Bug: #1847141
    Change-Id: I23b8ca6a3f481781d9d91e1a5d83ab1311a272e2