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.
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.
Reviewed: https:/ /review. opendev. org/687305 /git.openstack. org/cgit/ openstack/ tripleo- common/ commit/ ?id=162e3a00069 d9e1aba1487eda8 427ab3f45aac77
Committed: https:/
Submitter: Zuul
Branch: master
commit 162e3a00069d9e1 aba1487eda8427a b3f45aac77
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 /github. com/containers/ libpod/ issues/ 3516
docker reference is invalid. A name must be used:
https:/
This change uses socket. gethostname( ) to find the .ctlplane' . If the entry exist
hostname and then does a lookup in /etc/hosts using
'getent hosts <shortname>
the fqdn in the hosts entry is used.
Related-Bug: #1836578 81d9d91e1a5d83a b1311a272e2
Closes-Bug: #1847141
Change-Id: I23b8ca6a3f4817