Bug 1815218 - ExtraHostFileEntries only works for -ONE- entry, not more than one
Summary: ExtraHostFileEntries only works for -ONE- entry, not more than one
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Cédric Jeanneret
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-19 19:11 UTC by Vincent S. Cojot
Modified: 2020-05-14 12:16 UTC (History)
4 users (show)

Fixed In Version: tripleo-ansible-0.4.2-0.20200328100137.f15182e.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-14 12:16:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1868588 0 None None None 2020-03-23 16:37:27 UTC
OpenStack gerrit 715357 0 None MERGED Rework how we push the content in the file 2020-07-19 20:34:13 UTC
Red Hat Product Errata RHBA-2020:2114 0 None None None 2020-05-14 12:16:51 UTC

Description Vincent S. Cojot 2020-03-19 19:11:45 UTC
Description of problem:

I'm trying to use this:

===============================================================
parameter_defaults:
  ExtraHostFileEntries:
    - '10.0.128.186 sat6.lasthome.solace.krynn sat6'
    - '10.0.129.186 gitlab.lasthome.solace.krynn gitlab'
    - '10.0.130.186 ca8.lasthome.solace.krynn ca8'
    - '10.0.128.254 imladris.lasthome.solace.krynn imladris'
===============================================================

When I do that, I get all this on a single line on the overcloud nodes( in /etc/hosts):

===============================================================
[...]
10.0.128.186 sat6.lasthome.solace.krynn sat610.0.129.186 gitlab.lasthome.solace.krynn gitlab10.0.130.186 ca8.lasthome.solace.krynn ca810.0.128.254 imladris.lasthome.solace.krynn imladris
===============================================================

I tried " instead of ' but it made no difference. I also tried this syntax (all on one line):
ExtraHostFileEntries: ['10.0.128.186 sat6.lasthome.solace.krynn sat6','10.0.129.186 gitlab.lasthome.solace.krynn gitlab','10.0.130.186 ca8.lasthome.solace.krynn ca8','10.0.128.254 imladris.lasthome.solace.krynn imladris']

but again I got the same results.

If I use a -single- entry, then things work as expected:
===============================================================
parameter_defaults:
  ExtraHostFileEntries:
    - '10.0.128.186 sat6.lasthome.solace.krynn sat6'
===============================================================
or
===============================================================
ExtraHostFileEntries: ['10.0.128.186 sat6.lasthome.solace.krynn sat6']
===============================================================
Then I do get a working /etc/hosts but I suspect this might be just a side-effect of having -ONE- value.

Comment 1 Cédric Jeanneret 2020-03-20 07:24:26 UTC
Hello there,

The following patch should correct the situation hopefully.

I'll put it on test on my lab while CI and reviews provide a verdict.

Cheers,

C.

Comment 2 Cédric Jeanneret 2020-03-23 16:26:25 UTC
Hello,

After some poking around and tests, it appears my change wasn't the most efficient. The new one solves the current issue AND some others, which is of course better.

I'll make sure it's backported in OSP-16.0 asap.

Cheers,

C.

Comment 9 errata-xmlrpc 2020-05-14 12:16:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2114


Note You need to log in before you can comment on or make changes to this bug.