Hide Forgot
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:
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.
(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
https://github.com/rhinstaller/anaconda/pull/3682
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?
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.
@jstodola review and suggestions are perfect, I have nothing to add to them.
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
*** Bug 1873543 has been marked as a duplicate of this bug. ***