/etc/hosts should have correct entries on Smgr Install

Bug #1463513 reported by Nitish Krishna Kaveri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Won't Fix
Low
Nitish Krishna Kaveri
Trunk
Fix Committed
Low
Nitish Krishna Kaveri

Bug Description

The /etc/hosts file should correctly associate the interface supplied to server manager through the --hostip option in setup script with the hostname (and domain name if supplied).

This ensures that in the case of multi interface on smgr node, the server manager communicates on the correct interface.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/9566
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/9567
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9567
Committed: http://github.org/Juniper/contrail-packaging/commit/351d7a0938e13b20078dcb9b706f884d4d5c5b09
Submitter: Zuul
Branch: master

commit 351d7a0938e13b20078dcb9b706f884d4d5c5b09
Author: nitishkrishna <email address hidden>
Date: Tue Jun 9 12:32:03 2015 -0700

Closes-Bug: #1463513 - Setting correct interface entries in /etc/hosts for Smgr

This check-in:

- Modifies the setup script to add correct entries to /etc/hosts file
- It handles the three following scenarios

1. /etc/hosts file doesn't have an entry for the interface server manager listens on (Mgmt Interface IP Address)
-> Script adds <hostip> <hostname> entry, given --hostip option
-> Script adds <hostip> <hostname> <hostname>.<domain> entry, given --hostip and --domain options
-> Both scenarios, entry is the first line in /etc/hosts file

2. /etc/hosts file has entry for correct host ip but wrong host name (and domain name)
-> Script adds <hostname> to end of <hostip> line, given --hostip option
-> Script adds <hostname> <hostname>.<domain> to end of <hostip> line, given --hostip and --domain options

3. /etc/hosts file has entry for correct host ip and host name, but is missing domain name
-> Script adds <hostname> <hostname>.<domain> to end of <hostip> line, given --hostip and --domain options

- In the above cases, in single interface scenario, the --hostip option is not needed
- In multi interface, we need to specify the correct interface as --hostip, otherwise ip of eth0/first interface is taken by default

Change-Id: I1c203cd6593702c45db0e8bf4746033da295b129

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.