[ubuntu host] Handle duplicated hostnames in /etc/hosts file (127.0.1.1 problem)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Fix Released
|
High
|
Dincer Celik | ||
Stein |
Fix Released
|
Medium
|
Dincer Celik | ||
Train |
Fix Released
|
High
|
Dincer Celik |
Bug Description
As default in Debian and Ubuntu there is a line in /etc/hosts file that make sure the device is always answering on it's hostname.
127.0.1.1 control1.
https:/
This creates a problem for kolla-ansible because it adds lines like this in /etc/hosts file
# BEGIN ANSIBLE GENERATED HOSTS
192.168.38.14 control1
192.168.38.15 control2
192.168.38.18 control3
192.168.38.13 compute1
192.168.38.16 compute2
192.168.38.20 compute3
192.168.38.12 storage1
192.168.38.17 storage2
192.168.38.19 storage3
# END ANSIBLE GENERATED HOSTS
The problem here is that connection will be made against 127.0.1.1 instead of 192.168.38.14 where for example rabbitmq is listening.
The solution for me is not clear but it needs to be handled for a nicer user experience when installing kolla-ansible.
Currently am having problem with rabbitmq docker container restarting without telling me why.
RUNNING HANDLER [rabbitmq : Waiting for rabbitmq to start on first node] says "non-zero return code" and fails.
summary: |
- Handle dublicated hostnames in /etc/hosts file (127.0.1.1 problem) + [ubuntu host] Handle duplicated hostnames in /etc/hosts file (127.0.1.1 + problem) |
Changed in kolla-ansible: | |
assignee: | Mark Goddard (mgoddard) → Dincer Celik (osmanlicilegi) |
We add this at the bottom and resolv seems to pick up the first occurence.
Hackish fix is to add it at the top of the file. :-)
Less hackish is to actually check lines for each host and fix them properly.