Bug 1545957 - Entries in /etc/hosts file can be overwritten by playbook due to bad regex
Summary: Entries in /etc/hosts file can be overwritten by playbook due to bad regex
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gluster-colonizer
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.3.1 Async
Assignee: Dustin Black
QA Contact: Nag Pavan Chilakam
URL:
Whiteboard:
Depends On:
Blocks: 1542835
TreeView+ depends on / blocked
 
Reported: 2018-02-15 23:55 UTC by Dustin Black
Modified: 2018-04-05 07:28 UTC (History)
6 users (show)

Fixed In Version: gluster-colonizer-1.0.3-1.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-12 12:06:14 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0477 0 normal SHIPPED_LIVE RHEA: new package: gluster-colonizer 2018-03-12 18:12:47 UTC

Description Dustin Black 2018-02-15 23:55:34 UTC
Description of problem:
Enumerated host names like g1, g2, g3, etc can cause entries in /etc/hosts to get overwritten when numbers are in double digits and the order of assignment in the ansible play puts a smaller number after a bigger number. For instance, if g12 is populated in the hosts file first, then g1 would overwrite that entry because of a bad regex match.

Version-Release number of selected component (if applicable):
v1.0.2

How reproducible:
Mostly consistently, but could vary with random-ish order of play operations

Steps to Reproduce:
1. Deploy colonizer to 12 nodes
2. Enumerate hostnames g{1..12}

Actual results:
Colonizer fails, possibly at variable plays after the hosts file is populated.

Expected results:
Colonizer populates the hosts file correctly and completes

Additional info:

Comment 2 Dustin Black 2018-02-15 23:58:42 UTC
Upstream merge commit corrects this problem:

https://github.com/gluster/gluster-colonizer/commit/cb9f5a36b7471af95857c4af8debc73185a934a8

Comment 3 Nag Pavan Chilakam 2018-02-21 14:56:58 UTC
Dustin,
How do i verify this as I have only 6 nodes?

Comment 4 Dustin Black 2018-02-21 16:52:26 UTC
Try manually naming the nodes:

node1
node10
node100
node1000
node10000
node100000

Prior to the fix, this will almost definitely trigger the problem.

Comment 6 Nag Pavan Chilakam 2018-03-07 21:01:09 UTC
i see that colonizer is able to take names bigger than 2 letters.
However , for some reason i am seeing failures in deployment not completing.
I guess the last entry is not getting peer probed

Comment 7 Nag Pavan Chilakam 2018-03-08 02:25:37 UTC
i see hostnames being taken with as big as even 10 letters and /etc/hosts not having any descrepencies , hence moving to verified

however raised a new bz#1553011 - Colonizer seems to be failing when hostnames are entered manuall

Comment 10 errata-xmlrpc 2018-03-12 12:06:14 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/RHEA-2018:0477


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