#2004 PR merged: network: Automatically map device to its new name when device is found on the system with same MAC address but different name

Labels: enhancement, bug, fixed / solved / done

rmetrich opened issue at 2018-12-13 15:28:

Relax-and-Recover (ReaR) Pull Request Template

Please fill in the following items before submitting a new pull request:

Pull Request Details:
  • Type: Bug Fix

  • Impact: Normal

  • How was this pull request tested? Tested on RHEL7

  • Brief description of the changes in this pull request:

Prior to this change, when a network interface had a custom name set instead of ethX, the network configuration was not applied. Typical usage is the ifcfg file sets up a DEVICE name and HWADDR mapping.

The new code fixes this issue by running the network interface migration code in an unattended manner.

Example (tested on a RHEL 7 box):

/etc/sysconfig/network-scripts/ifcfg-first:
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV6INIT="no"
DEVICE="first"
HWADDR="52:54:00:eb:6c:bf"
ONBOOT="yes"

/etc/rear/site.conf:

USE_STATIC_NETWORKING=y

Prior to this change:

  • no network configured

With this code:

  • network is configured, interface first is mapped onto eth0 temporarily
  • after recovery and reboot, the network interface first will be restored

jsmeix commented at 2018-12-14 09:08:

@schabrolles
could you also have a look here if it looks o.k. to you?

I added you as reviewer because you did some recent changes in
skel/default/etc/scripts/system-setup.d/55-migrate-network-devices.sh

jsmeix commented at 2018-12-14 10:36:

@gdha
could you also approve it if things look o.k. to you?

jsmeix commented at 2018-12-18 10:23:

@rmetrich
welcome to our team!
I appreciate it so much to have you in our team.

Accordingly I re-assigned this pull request to you
so that you could merge it as you like.


[Export of Github issue for rear/rear.]