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 1940919 - parse-kickstart doesn't create expected information for bond ports
Summary: parse-kickstart doesn't create expected information for bond ports
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: anaconda
Version: 8.3
Hardware: All
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Radek Vykydal
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-19 14:34 UTC by Renaud Métrich
Modified: 2024-06-14 00:55 UTC (History)
13 users (show)

Fixed In Version: anaconda-33.16.8.4-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2133053 (view as bug list)
Environment:
Last Closed: 2023-05-16 08:15:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RTT-4943 0 None None None 2022-10-25 12:42:40 UTC
Red Hat Issue Tracker RTT-4944 0 None None None 2022-10-25 12:42:46 UTC
Red Hat Product Errata RHBA-2023:2748 0 None None None 2023-05-16 08:15:46 UTC

Description Renaud Métrich 2021-03-19 14:34:56 UTC
Description of problem:

Upon boot, parse-kickstart parses the kickstart and searches for the first "network" stanza only. It then creates /tmp/ifcfg/ifcfg-* files. This works fine.
Additionally it generates an excerpt of cmdline, e.g. "bootdev=bond0 ip=...:bond0:...

Example:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
network  --hostname=vm-test8 --device=bond0 --mtu=1500 --bondslaves=enp1s0,enp2s0 --bondopts=mode=active-backup --bootproto=static --noipv6 --activate --ip=192.168.122.47 --netmask=255.255.255.0 --gateway=192.168.122.1
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Generated files by parse-kickstart:
 - /tmp/ifcfg/ifcfg-bond0
 - /tmp/ifcfg/ifcfg-bond0_slave_1
 - /tmp/ifcfg/ifcfg-bond0_slave_2

Generated stdout (then pushed to /etc/cmdline.d/80-kickstart.conf):
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
ip=192.168.122.47::192.168.122.1:255.255.255.0:vm-test8:bond0:none:1500 bootdev=bond0
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This is then used by nm-initrd-generator to generate NM profiles.

Apparently nm-initrd-generator doesn't rely on /tmp/ifcfg/ifcfg-* files, but only the command line:

/usr/lib/nm-lib.sh:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[...]
    /usr/libexec/nm-initrd-generator -- $(getcmdline)
[...]
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

From above, we can see that the generated stdout is broken and lacks the full definition of the bond, which causes an infinite hang to happen (well not exactly infinite, but almost):
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[    7.369943] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[    7.370838] 8021q: adding VLAN 0 to HW filter on device enp1s0
[    7.373143] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[    7.373987] 8021q: adding VLAN 0 to HW filter on device enp2s0
---> nothing then
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

There are 2 solutions for this:
1. Generate the appropriate cmdline
or
2. Generate files in /etc/sysconfig/network-scripts (this works, but I fear this will collide with initial boot parameters, if any)


Version-Release number of selected component (if applicable):

dracut-049-95.git20200804.el8


How reproducible:

Always

Steps to Reproduce: Boot with a kickstart hosted on a minimal DVD (don't setup the network initiallyà

1. Create a minimal DVD stub

  # mkdir rhel83.minimal && cd rhel83.minimal
  # cp -r /var/www/html/rhel83/{EFI,images,isolinux} .

2. Create a minimal kickstart

  # cat > ks.cfg << EOF
  url --url http://192.168.122.1/rhel83
  network  --hostname=vm-test8 --device=bond0 --mtu=1500 --bondslaves=enp1s0,enp2s0 --bondopts=mode=active-backup --bootproto=static --noipv6 --activate --ip=192.168.122.47 --netmask=255.255.255.0 --gateway=192.168.122.1
  EOF

3. Build the minimal DVD

  # mkisofs -o /tmp/rhel83.minimal.iso -b isolinux/isolinux.bin -J -R -l -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -graft-points -V "RHEL-8-3-0-BaseOS-x86_64" .

4. Boot a VM with 2 NICs (enp1s0, enp2s0) and append "inst.ks=cdrom:/ks.cfg" to kernel command line


Actual results:

Hang before switching root, no way to get a dracut shell.


Expected results:

Network configuration and installation continues.

Comment 1 Beniamino Galvani 2021-04-15 13:45:55 UTC
> There are 2 solutions for this:
> 1. Generate the appropriate cmdline
> or
> 2. Generate files in /etc/sysconfig/network-scripts (this works, but I fear this will collide with initial boot parameters, if any)

I think parse-kickstart should generate a kernel command line with all the networking parameters.

Options --bondslaves= and --bondopts= can be represented by a command line:

  bond=<bondname>[:<bondslaves>:[:<options>[:<mtu>]]]

Radek, do you think this is feasible?

Comment 2 Radek Vykydal 2021-04-16 14:31:28 UTC
(In reply to Beniamino Galvani from comment #1)
> > There are 2 solutions for this:
> > 1. Generate the appropriate cmdline
> > or
> > 2. Generate files in /etc/sysconfig/network-scripts (this works, but I fear this will collide with initial boot parameters, if any)
> 
> I think parse-kickstart should generate a kernel command line with all the
> networking parameters.
> 
> Options --bondslaves= and --bondopts= can be represented by a command line:
> 
>   bond=<bondname>[:<bondslaves>:[:<options>[:<mtu>]]]
> 
> Radek, do you think this is feasible?

Yes, this should work, upstream PR:
https://github.com/rhinstaller/anaconda/pull/3296

Comment 7 Radek Vykydal 2022-10-25 13:18:11 UTC
Kickstart test for the issue: https://github.com/rhinstaller/kickstart-tests/pull/818

Comment 9 Jan Stodola 2022-12-14 15:43:33 UTC
Reproduced on RHEL-8.7 with a kickstart file included on boot.iso using mkksiso (and also with "--nameserver=192.168.122.1" option added to the network command)

With the same steps using compose RHEL-8.8.0-20221213.d.0 with anaconda-33.16.8.4-1.el8, the installer successfully activated the bond device specified in the kickstart file and fetched stage2. bond0 was the only device with an IP address. The bond0 interface was also successfully activated on the installed system.

Marking as Verified:Tested

Comment 15 errata-xmlrpc 2023-05-16 08:15:29 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-2023:2748


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