37899026bf
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
8 lines
262 B
YAML
8 lines
262 B
YAML
---
|
|
fixes:
|
|
- |
|
|
Adds system hostnames to ``/etc/hosts``, if different from short hostnames.
|
|
This can fix live migration of Nova instances in some contexts. See `bug
|
|
1830023 <https://bugs.launchpad.net/kolla-ansible/+bug/1830023>`__ for
|
|
details.
|