Bug 1400510

Summary: os-net-config-mappings.yaml - Example does not work on most hardware due to "Consistent Network Device Naming
Product: Red Hat OpenStack Reporter: Harald Jensås <hjensas>
Component: openstack-tripleo-heat-templatesAssignee: Jiri Stransky <jstransk>
Status: CLOSED ERRATA QA Contact: mlammon
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: amuller, aschultz, dsneddon, jjoyce, mburns, rhel-osp-director-maint
Target Milestone: z3Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-5.2.0-18.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-28 14:44:12 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:
Embargoed:

Description Harald Jensås 2016-12-01 12:11:52 UTC
Description of problem:
The following line in OsNetConfigMappings: resource of this example is using "eth0" network device name to get a eth address as "system identifier"

  eth_addr=$(/sbin/ifconfig eth0 | grep ether | awk '{print $2}')

On a CentOS or RHEL deployment on baremetal hardware would not have an "eth0" interface. Because of Consisten Netowork Device Naming[1], the interface can be "emX", "enoX" or "pXpX" etc.

[1] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Consistent_Network_Device_Naming.html

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


How reproducible:
Try os-net-config-mappings on a hardware system. Due to Consistent Device Names being enabled by default the "/sbin/ifconfig eth0" command returns an error such as:
 'eth0: error fetching interface information: Device not found'

Actual results:
NIC mapping file is not created, because the method to identify the different host does not work when Consistent Network Device Naming is enabled.

Expected results:
The host should be identified even with Consisten Network Device Naming enabled, and the mappings.yaml file should be written.

Additional info:

Upstram Bug: https://bugs.launchpad.net/tripleo/+bug/1642551

Proposed Fix upstream: https://review.openstack.org/#/c/399040/

Comment 2 Jiri Stransky 2016-12-04 22:08:53 UTC
Backport to stable/newton: https://review.openstack.org/#/c/406634/

Comment 3 Red Hat Bugzilla Rules Engine 2017-02-08 17:24:30 UTC
This bugzilla has been removed from the release and needs to be reviewed and Triaged for another Target Release.

Comment 9 errata-xmlrpc 2017-06-28 14:44:12 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-2017:1585