Invalid line in /etc/hosts (two IP addresses) on AIO

Bug #1274263 reported by Mark T. Voelker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cisco Openstack
Fix Released
Medium
Mark T. Voelker
Havana
Fix Released
Medium
Mark T. Voelker

Bug Description

An h.1 AIO buildout leaves me with an /etc/hosts file that contains a line with two IP Addresses like this:

192.168.255.134 192.168.255.134

While this doesn't seem to impact functionality, I suspect it might cause some trouble with Ceph if were ever to add it to AIO and clearly just isn't correct anyway. I've also noticed a line like this:

192.168.255.134 compute01 compute01.domain.name

In which the short and long hostnames are reversed. Again, doesn't seem to really impact anything functionally but is wrong.

Revision history for this message
Mark T. Voelker (mvoelker) wrote :

I think this may the issue causing the two-IP-addresses-in-one-line problem:

The coe::base class has a parameter for $controller_hostname:

https://github.com/CiscoSystems/puppet-coe/blob/h.1/manifests/base.pp#L10

Which gets used to create an /etc/hosts entry:

https://github.com/CiscoSystems/puppet-coe/blob/h.1/manifests/base.pp#L164-L167

But the data mappings in data/data_mappings/common.yaml that actually feed that class look questionable in that they map the controller_hostname parameter to controller_internal_address:

https://github.com/CiscoSystems/puppet_openstack_builder/blob/h.1/data/data_mappings/common.yaml#L108
https://github.com/CiscoSystems/puppet_openstack_builder/blob/h.1/data/data_mappings/common.yaml#L60

That's problematic because controller_internal_address is, as the name implies, an IP address:

https://github.com/CiscoSystems/puppet_openstack_builder/blob/h.1/data/hiera_data/user.common.yaml#L64-L68

That results in the line with duplicate IP addresses. To fix it, we should eliminate that mapping and map it to something more sensible (or don't map it to anything and set it explicitly in yaml). Note that this wouldn't affect HA builds since user.full_ha.yaml has an explicit override:

https://github.com/CiscoSystems/puppet_openstack_builder/blob/h.1/data/hiera_data/user.full_ha.yaml#L11

Doing similar in the non-ha yamls would be a simple workaround for the issue.

Changed in openstack-cisco:
status: Triaged → In Progress
Revision history for this message
Mark T. Voelker (mvoelker) wrote :

Patch for the two-ip-addresses-on-one-line issue:
https://review.openstack.org/#/c/70038

Revision history for this message
Mark T. Voelker (mvoelker) wrote :

The fix for the "ip short_hostname canonical_hostname" line is in:
https://review.openstack.org/71830

Changed in openstack-cisco:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.