os-net-config-mappings.yaml - Example does not work on most hardware due to "Consistent Network Device Naming"

Bug #1642551 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Undecided
Harald Jensås

Bug Description

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

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

Changed in tripleo:
assignee: nobody → Harald Jensås (harald-jensas)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/399040
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=06d4d088adcceb6076017fb2a58b5a339232a6a3
Submitter: Jenkins
Branch: master

commit 06d4d088adcceb6076017fb2a58b5a339232a6a3
Author: Harald Jensas <email address hidden>
Date: Thu Nov 17 15:37:10 2016 +0100

    No longer hard coding to a specifc network interface name.

    Instead of using a specific network interface name, thi fix
    fetch all ethernet mac addresses. Then uses this list of
    mac addresses to do a check if any entries in the list
    match any of the values in NetConfigDataLookup for a node.
    If there is a match, the /etc/os-net-config/mapping.yaml
    file for the node will be written.

    This fix removes the hard coded interface name 'eth0' used
    to get a mac address as identifyer for the specific node
    before. Using a hard coded interface name such as 'eth0'
    would have failed on most hardware because of "consistent
    network device names".

        Fix Bug: #1642551

    Change-Id: I6c1d1b4d70b916bc5d9049469df8221f8ab2eb95

tags: added: newton-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/newton)

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

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

Reviewed: https://review.openstack.org/406634
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=6ef04176474e6b6034b4d4ae0081cb759eaa760b
Submitter: Jenkins
Branch: stable/newton

commit 6ef04176474e6b6034b4d4ae0081cb759eaa760b
Author: Harald Jensas <email address hidden>
Date: Thu Nov 17 15:37:10 2016 +0100

    No longer hard coding to a specifc network interface name.

    Instead of using a specific network interface name, thi fix
    fetch all ethernet mac addresses. Then uses this list of
    mac addresses to do a check if any entries in the list
    match any of the values in NetConfigDataLookup for a node.
    If there is a match, the /etc/os-net-config/mapping.yaml
    file for the node will be written.

    This fix removes the hard coded interface name 'eth0' used
    to get a mac address as identifyer for the specific node
    before. Using a hard coded interface name such as 'eth0'
    would have failed on most hardware because of "consistent
    network device names".

        Fix Bug: #1642551

    Change-Id: I6c1d1b4d70b916bc5d9049469df8221f8ab2eb95
    (cherry picked from commit 06d4d088adcceb6076017fb2a58b5a339232a6a3)

tags: added: in-stable-newton
Changed in tripleo:
status: In Progress → Fix Released
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.