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 1990145 - (some) NIC options don't convey when we import them via an %include
Summary: (some) NIC options don't convey when we import them via an %include
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: anaconda
Version: 8.7
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: Nobody
QA Contact: Release Test Team
URL:
Whiteboard:
: 1873543 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-04 20:51 UTC by Frank Hirtz
Modified: 2023-12-15 20:13 UTC (History)
6 users (show)

Fixed In Version: anaconda-33.16.6.3-1.el8
Doc Type: Bug Fix
Doc Text:
.The `network --defroute` option now works correctly in the `%include` script Previously, the `network --defroute` option got ignored when used in the `%include` script during the kickstart installation. As a consequence, the device was set as the default route. With this update, the kickstart installation does not ignore the `network --defroute` option added in the `%include` script and the network connection is configured as expected.
Clone Of:
Environment:
Last Closed: 2022-05-10 13:36:52 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-92412 0 None None None 2021-08-04 21:11:57 UTC
Red Hat Issue Tracker RTT-3967 0 None None None 2021-11-03 14:44:24 UTC
Red Hat Issue Tracker RTT-3968 0 None None None 2021-11-03 14:44:30 UTC
Red Hat Product Errata RHBA-2022:1780 0 None None None 2022-05-10 13:37:23 UTC

Description Frank Hirtz 2021-08-04 20:51:06 UTC
Description of problem:
When we specify the "nodefroute" in a network configuration that's included from a %pre script, the option doesn't convey to the built configuration: 

<snip>
[root@localhost ~]# grep 'network\|pre\|include' original-ks.cfg  | grep -v ^#
%include /tmp/netconfig.ks
%pre
echo "network --bootproto=dhcp --device=56:6f:15:f7:00:21 --noipv6 --activate" > /tmp/netconfig.ks > /tmp/netconfig.ks
echo "network --bootproto=static --device=56:6f:15:f7:00:25 --ip=192.168.4.28 --netmask=255.255.255.0 --noipv6 --nodefroute" >> /tmp/netconfig.ks
echo "network --bootproto=static --device=56:6f:15:f7:01:26 --ip=192.168.4.29 --netmask=255.255.255.0 --noipv6 --nodefroute" >> /tmp/netconfig.ks
@network-tools
[root@localhost ~]# grep 'DEF\|IP' /etc/sysconfig/network-scripts/*
/etc/sysconfig/network-scripts/ifcfg-ens3:DEFROUTE=yes
/etc/sysconfig/network-scripts/ifcfg-ens3:IPV4_FAILURE_FATAL=no
/etc/sysconfig/network-scripts/ifcfg-ens3:IPV6INIT=no
/etc/sysconfig/network-scripts/ifcfg-ens4:IPADDR=192.168.4.28
/etc/sysconfig/network-scripts/ifcfg-ens4:DEFROUTE=yes
/etc/sysconfig/network-scripts/ifcfg-ens4:IPV4_FAILURE_FATAL=no
/etc/sysconfig/network-scripts/ifcfg-ens4:IPV6INIT=no
/etc/sysconfig/network-scripts/ifcfg-ens5:IPADDR=192.168.4.29
/etc/sysconfig/network-scripts/ifcfg-ens5:DEFROUTE=yes
/etc/sysconfig/network-scripts/ifcfg-ens5:IPV4_FAILURE_FATAL=no
/etc/sysconfig/network-scripts/ifcfg-ens5:IPV6INIT=no
</snip>

Now we change that configuration to just be inline in the kickstart, but keep the actual configuration otherwise the same and it works:

<snip>
[root@localhost ~]# grep 'network\|pre\|include' original-ks.cfg  | grep -v ^#
network --bootproto=dhcp --device=56:6f:15:f7:00:21 --noipv6 --activate
network --bootproto=static --device=56:6f:15:f7:00:25 --ip=192.168.4.28 --netmask=255.255.255.0 --noipv6 --nodefroute
network --bootproto=static --device=56:6f:15:f7:01:26 --ip=192.168.4.29 --netmask=255.255.255.0 --noipv6 --nodefroute
@network-tools
[root@localhost ~]# grep 'DEF\|IP' /etc/sysconfig/network-scripts/*
/etc/sysconfig/network-scripts/ifcfg-ens3:IPV6INIT=no
/etc/sysconfig/network-scripts/ifcfg-ens3:DEFROUTE=yes
/etc/sysconfig/network-scripts/ifcfg-ens3:IPV4_FAILURE_FATAL=no
/etc/sysconfig/network-scripts/ifcfg-ens4:IPADDR=192.168.4.28
/etc/sysconfig/network-scripts/ifcfg-ens4:IPV6INIT=no
/etc/sysconfig/network-scripts/ifcfg-ens4:DEFROUTE=no
/etc/sysconfig/network-scripts/ifcfg-ens4:IPV4_FAILURE_FATAL=no
/etc/sysconfig/network-scripts/ifcfg-ens5:IPADDR=192.168.4.29
/etc/sysconfig/network-scripts/ifcfg-ens5:IPV6INIT=no
/etc/sysconfig/network-scripts/ifcfg-ens5:DEFROUTE=no
/etc/sysconfig/network-scripts/ifcfg-ens5:IPV4_FAILURE_FATAL=no
</snip>

I tested this on 8.2 and 8.2 with the same results

Version-Release number of selected component (if applicable):
anaconda 33.16.4.15-1.el8

How reproducible:


Steps to Reproduce:
Noted above

Actual results:
"DEFROUTE=yes" for interfaces that are configured otherwise in the kickstart

Expected results:
DEFROUTE=no

Additional info:

Comment 1 Radek Vykydal 2021-08-26 13:15:49 UTC
The issue would be fixed by applying this upstream fix:
https://github.com/rhinstaller/anaconda/commit/f9e02c46f6054ac48811ed9c9229a322c2ab5d6c

I am going to create a kickstart/regression test for the issue.

Comment 2 Radek Vykydal 2021-08-30 08:56:17 UTC
(In reply to Radek Vykydal from comment #1)
 
> I am going to create a kickstart/regression test for the issue.

https://github.com/rhinstaller/kickstart-tests/pull/574

Comment 5 Radek Vykydal 2021-11-04 14:54:32 UTC
https://github.com/rhinstaller/anaconda/pull/3682

Comment 6 Jan Stodola 2021-11-18 15:14:24 UTC
Reproduced on RHEL-8.5 using the "network-options-pre" kickstart-test:
*** Failed check: DEFROUTE=no in /etc/sysconfig/network-scripts/ifcfg-enp2s0 or ipv4.never-default=true in /etc/NetworkManager/system-connections/enp2s0.nmconnection
*** Failed check: MTU=9000 in /etc/sysconfig/network-scripts/ifcfg-enp3s0 or ethernet.mtu=9000 in /etc/NetworkManager/system-connections/enp3s0.nmconnection

The same test passed on RHEL-8.6.0-20211117.d.3 with anaconda-33.16.6.3-1.el8:
INFO: RESULT:network-options-pre:b3a4cd274619:SUCCESS:test done

Marking as Verified:Tested

Radku, can you please provide a doc text for this bug?

Comment 9 Jan Stodola 2021-11-23 15:40:40 UTC
anaconda-33.16.6.3-1.el8 is included in RHEL-8.6.0-20211122.1 and Doc text for the bug has been provided. Moving to VERIFIED.

Comment 12 Radek Vykydal 2022-02-14 07:34:41 UTC
@jstodola review and suggestions are perfect, I have nothing to add to them.

Comment 15 errata-xmlrpc 2022-05-10 13:36:52 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 (anaconda bug fix and enhancement update), 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-2022:1780

Comment 16 Jan Stodola 2022-10-14 11:34:47 UTC
*** Bug 1873543 has been marked as a duplicate of this bug. ***


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