Bug 1328009

Summary: debug.sh will report incorrect message when the /etc/hosts has extra spaces in the end of the lines
Product: OKD Reporter: Meng Bo <bmeng>
Component: NetworkingAssignee: Phil Cameron <pcameron>
Status: CLOSED CURRENTRELEASE QA Contact: Meng Bo <bmeng>
Severity: low Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, sukulkar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-09 21:51:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Meng Bo 2016-04-18 08:44:45 UTC
Description of problem:
Setup multi-node env with resolve the master/node name in /etc/hosts. 

Run the debug.sh on master when the /etc/hosts file contains extra space in the end of the hostname.

eg.
cat -e /etc/hosts
10.66.128.64    node3.bmeng.local      $

It will report incorrect messages about the IP mis-match.


Version-Release number of selected component (if applicable):
openshift-sdn commit: 855a002d3ca0481e0a36a5360737841a3904aa97

How reproducible:
always

Steps to Reproduce:
1. Run debug.sh on master when the /etc/hosts contains extra space in the end of node hostname.
2.
3.

Actual results:
# ./debug.sh
Analyzing master
Node node3.bmeng.local: no IP address in either DNS or /etc/hosts
Node node3.bmeng.local: the IP in OpenShift (10.66.128.64) does not match DNS/hosts ()

# ping node3.bmeng.local
PING node3.bmeng.local (10.66.128.64) 56(84) bytes of data.


Expected results:
Should not report such error if the hostname resolvable. 

Additional info:

Comment 1 Phil Cameron 2016-09-13 18:04:12 UTC
Fixed in openshift-sdn PR 323. PR is merged.

Comment 2 Meng Bo 2016-09-14 02:08:05 UTC
Checked with the latest debug.sh

The issue has been fixed.