Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 1328576 - RFE: When a MAC address is provided in a network kickstart line, it should be written to the installed ifcfg file as the HWADDR
RFE: When a MAC address is provided in a network kickstart line, it should be...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda (Show other bugs)
7.2
x86_64 Linux
medium Severity high
: rc
: ---
Assigned To: Radek Vykydal
Release Test Team
Petr Bokoc
: FutureFeature
Depends On: 1483981
Blocks: 1420851 1478303
  Show dependency treegraph
 
Reported: 2016-04-19 14:05 EDT by jcastran
Modified: 2018-04-10 04:47 EDT (History)
13 users (show)

See Also:
Fixed In Version: anaconda-21.48.22.124-1
Doc Type: Enhancement
Doc Text:
New option for the "network" Kickstart command binding the device configuration file to the device MAC address You can now use the new "--bindto=mac" option with the "network" Kickstart command to use the `HWADDR` parameter (the MAC address) instead of the default `DEVICE` in the device's `ifcfg` file on the installed system. This will bind the device configuration to the MAC instead of the device name. Note that the new "--bindto" option is independent of the "network --device" Kickstart option. It will be applied to the `ifcfg` file even if the device was specified in the Kickstart file using its name, `link`, or `bootif`.
Story Points: ---
Clone Of:
: 1483981 1488414 (view as bug list)
Environment:
Last Closed: 2018-04-10 04:45:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0671 None None None 2018-04-10 04:47 EDT

  None (edit)
Comment 2 Radek Vykydal 2016-04-20 06:23:10 EDT
To prevent breaking current behavior (bug 1130042) I'd propose to add

--bindtomac

or 

--bindto=mac

network command flag.

The harder part here might be that currently we are assuming interface-name (DEVICE) setting present in connection (ifcfg) and in this case we probably want only HWADDR to be present, ie we don't want to bind device name to MAC (rename by udev's 60-net-rules) but we want just to bind connection to MAC.
Comment 4 Radek Vykydal 2017-08-03 10:39:40 EDT
Would the customer by ok with the solution using a new network kickstart command option as proposed in comment #2 ?
Comment 5 jcastran 2017-08-07 12:33:46 EDT
Customer agrees with this idea.

~~~~~~~~~~~~~~~~~~
Hello,

that sounds just right!

Perhaps it could become default behaviour if no device name is passed to the network configuration line.

Thanks.

~~~~~~~~~~~~~~~~~~
Comment 7 Radek Vykydal 2017-08-08 10:23:16 EDT
(In reply to jcastran from comment #5)

> Perhaps it could become default behaviour if no device name is passed to the
> network configuration line.

To make the requested feature safe and consistent with regard to current behavior and defaults, binding to MAC address should be used only if explicitly requested by the option, in all cases, ie --device missing, --device specified by device name, --device specified by MAC address, etc.
Comment 11 Fedora Update System 2017-09-29 12:06:31 EDT
anaconda-27.20.2-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595
Comment 12 Fedora Update System 2017-10-01 20:55:34 EDT
anaconda-27.20.2-1.fc27, pykickstart-2.39-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595
Comment 13 Fedora Update System 2017-10-02 06:50:16 EDT
anaconda-27.20.2-1.fc27 pykickstart-2.39-1.fc27 python-simpleline-0.6-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595
Comment 14 Fedora Update System 2017-10-02 17:25:52 EDT
anaconda-27.20.2-1.fc27, pykickstart-2.39-1.fc27, python-simpleline-0.6-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595
Comment 17 Radek Vykydal 2017-11-27 03:54:47 EST
I would just make clear that the HWADDR will be used *instead of* DEVICE for --bindto=mac. By default the ifcfg is bound to interface name (DEVICE=<interface_name> is used in ifcfg file). The new option allows to bind the configuration to the MAC address of the device. HWADDR=<mac> is used instead of the DEVICE in the ifcfg file [1]. The --device option is independent of the --bindto option, it only serves to identify the device installer should use the network configuration (ks command) for. For example you can specify the device to be configured by MAC (--device=<MAC>) but (by default) binding to interface name will by used (DEVICE=<interface_name> in ifcfg file). On the other hand you can the specify device by its name (--device=ens3) and require the configuration (ifcfg file) to be bound to MAC address by using --bindto=mac option, which will result in HWADDR=MAC set (and DEVICE= not used) in the ifcfg.
But I think in most cases using --bindto=mac, --device will be specified by MAC or link or left out completely (which means --device=link).

So I'd modify the doc text slightly to something like this:

New option for the "network" Kickstart command allows to bind the configuration (`ifcfg` file) to device's MAC address.
   
You can now use the new "--bindto=mac" option with the "network" Kickstart command to use the `HWADDR` parameter in the device's `ifcfg` file on the installed system instead of `DEVICE` parameter which would be used by default (binding to interface name).

Note that the new option for binding the configuration is independent of the --device option. The --bindto option will be applied to the configuration (`ifcfg` file) even if the device was specified using a device name, `link` or `bootif`.

[1] To make the picture complete (not to be mentioned in rel notes), there is also a case when both DEVICE and HWADDR are set in ifcfg: when ifname= installer boot option is used. Then the ifcfg is bound to MAC (beacuse of HWADDR set) but having also DEVICE in ifcfg means renaming the device with the MAC to the name specified by DEVICE during system startup (ie not only the ifcfg file, but also the interface name is bound to the MAC).
Comment 18 Petr Bokoc 2017-11-28 07:17:47 EST
Thanks! Updated.
Comment 21 errata-xmlrpc 2018-04-10 04:45:01 EDT
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-2018:0671

Note You need to log in before you can comment on or make changes to this bug.