kolla-ansible/releasenotes
Pierre Riteau 8d260e0e3f Add ansible_nodename (system hostname) to /etc/hosts
Kolla-Ansible populates /etc/hosts with overcloud hosts using their API
interface IP address. When configured correctly, this allows Nova to use
the API interface for live migration of instances between compute hosts.

The hostname used is from the `ansible_hostname` variable, which is a
short hostname generated by Ansible using the first dot as a delimiter.
However, Nova defaults to use the result of socket.gethostname() to
register nova-compute services.

In deployments where hostnames are set to FQDNs, for example when using
FreeIPA, nova-compute would try to reach the other compute node using
its FQDN (as registered in the Nova database), which was absent from
/etc/hosts. This can result in failures to live migrate instances if
DNS entries don't match.

This commit populates /etc/hosts with `ansible_nodename` (hostname as
reported by the system) in addition to `ansible_hostname`, if they are
different.

Change-Id: Id058aa1db8d60c979680e6a41f7f3e1c39f98235
Closes-Bug: #1830023
(cherry picked from commit 37899026bf)
2019-06-18 18:12:41 +00:00
..
notes Add ansible_nodename (system hostname) to /etc/hosts 2019-06-18 18:12:41 +00:00
source Update reno for stable/rocky 2018-09-04 16:24:24 +00:00