Unpredictable order of entries in /etc/hosts

Bug #1624143 reported by Dmytro Fomenko
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Stanislaw Bogatkin
Mitaka
Fix Released
Medium
Oleksiy Molchanov
Newton
Fix Committed
Medium
Oleksiy Molchanov

Bug Description

Detailed bug description:
Unpredictable order of entries in /etc/hosts. Entries, added by hosts/hosts.pp come in a different (from deployment to deployment) order, normal hostnames and hostname with a prefix for the same IP is messed up:
172.16.6.8 node-4.test.domain.local node-4
172.16.6.9 node-2.test.domain.local node-2
172.16.6.12 messaging-node-5.test.domain.local messaging-node-5
172.16.6.7 node-3.test.domain.local node-3
172.16.6.10 node-6.test.domain.local node-6
172.16.6.7 messaging-node-3.test.domain.local messaging-node-3
172.16.6.6 messaging-node-7.test.domain.local messaging-node-7
172.16.6.5 messaging-node-1.test.domain.local messaging-node-1
172.16.6.10 messaging-node-6.test.domain.local messaging-node-6
172.16.6.9 messaging-node-2.test.domain.local messaging-node-2
172.16.6.5 node-1.test.domain.local node-1
172.16.6.11 node-9.test.domain.local node-9
172.16.6.8 messaging-node-4.test.domain.local messaging-node-4
172.16.6.6 node-7.test.domain.local node-7
172.16.6.12 node-5.test.domain.local node-5
172.16.6.11 messaging-node-9.test.domain.local messaging-node-9

For the IP 172.16.6.8 the hostname 'node-4.test.domain.local' will be the answer while the IP 172.16.6.12 dnsmasq will resolve as 'messaging-node-5.test.domain.local', hostname with a prefix.
The issue was brought with fixing bug #1535383

Steps to reproduce:
Complete a deployment
Expected results:
Hostname come in some order, for example:
1) Existing entries,
2) Hostnames with a prefix
3) Hostname without a prefix.
Or vise versa, 1), then 3), then 2)
Actual result:
We have a mess described above.
Reproducibility:
100%
Workaround:
Unknown

Description of the environment:
 Operation system: Ubuntu 14.04
 Versions of components: Fuel 9.0

Tags: area-library
Dmitry Klenov (dklenov)
tags: added: area-library
Changed in fuel:
milestone: none → 9.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/380022

Changed in fuel:
status: Confirmed → In Progress
Changed in fuel:
assignee: Richard Berwald (rberwald) → Stanislaw Bogatkin (sbogatkin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/380022
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=9382a3eb5facec5b4e6dd8fe6ac03749e4c55b4e
Submitter: Jenkins
Branch: master

commit 9382a3eb5facec5b4e6dd8fe6ac03749e4c55b4e
Author: R. Berwald <email address hidden>
Date: Fri Sep 30 10:44:06 2016 +0200

    Adjust order of entries in /etc/hosts

    Order of all entries will be fqdn before prefix-fqdn.

    Change-Id: Ia203c457e76cc45b70532674f6366928acc09b48
    Closes-bug: #1624143

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/430873

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/430875

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/newton)

Reviewed: https://review.openstack.org/430873
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=a17d2e4666d2d9ddc399e2b12ba5e49958007f9a
Submitter: Jenkins
Branch: stable/newton

commit a17d2e4666d2d9ddc399e2b12ba5e49958007f9a
Author: R. Berwald <email address hidden>
Date: Fri Sep 30 10:44:06 2016 +0200

    Adjust order of entries in /etc/hosts

    Order of all entries will be fqdn before prefix-fqdn.

    Change-Id: Ia203c457e76cc45b70532674f6366928acc09b48
    Closes-bug: #1624143
    (cherry picked from commit 9382a3eb5facec5b4e6dd8fe6ac03749e4c55b4e)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-library 11.0.0.0rc1

This issue was fixed in the openstack/fuel-library 11.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/mitaka)

Reviewed: https://review.openstack.org/430875
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=c8444e799b384163b0bb8191684b5c9ca147cbb8
Submitter: Jenkins
Branch: stable/mitaka

commit c8444e799b384163b0bb8191684b5c9ca147cbb8
Author: R. Berwald <email address hidden>
Date: Fri Sep 30 10:44:06 2016 +0200

    Adjust order of entries in /etc/hosts

    Order of all entries will be fqdn before prefix-fqdn.

    Change-Id: Ia203c457e76cc45b70532674f6366928acc09b48
    Closes-bug: #1624143
    (cherry picked from commit 9382a3eb5facec5b4e6dd8fe6ac03749e4c55b4e)

tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.2 + mu2 updates.

After the fix hosts have certain order:
http://paste.openstack.org/show/609756/

tags: removed: on-verification
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.