RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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
Summary: RFE: When a MAC address is provided in a network kickstart line, it should be...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Radek Vykydal
QA Contact: Release Test Team
Petr Bokoc
URL:
Whiteboard:
Depends On: 1483981
Blocks: 1420851 1478303
TreeView+ depends on / blocked
 
Reported: 2016-04-19 18:05 UTC by jcastran
Modified: 2021-09-09 11:49 UTC (History)
13 users (show)

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`.
Clone Of:
: 1483981 1488414 (view as bug list)
Environment:
Last Closed: 2018-04-10 08:45:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1361087 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHBA-2018:0671 0 None None None 2018-04-10 08:47:04 UTC

Internal Links: 1361087

Comment 2 Radek Vykydal 2016-04-20 10:23:10 UTC
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 14:39:40 UTC
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 16:33:46 UTC
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 14:23:16 UTC
(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 16:06:31 UTC
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-02 00:55:34 UTC
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 10:50:16 UTC
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 21:25:52 UTC
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 08:54:47 UTC
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 12:17:47 UTC
Thanks! Updated.

Comment 21 errata-xmlrpc 2018-04-10 08:45:01 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-2018:0671


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