Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionJoão Avelino Bellomo Filho
2016-10-27 21:07:33 UTC
Description of problem:
The dracut scripts fail to insert the mlx4_en module in iniramfs file when the kernel is a 3.10 kernel-rt.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Install a normal RHEL 6.8 system and register it:
subscription-manager register --auto-attach
2. Install a 3.10 kernel-rt support, for example:
yum -y --enablerepo rhel-6-server-realtime-rpms groupinstall "MRG Realtime"
3. Check if the 'mlx4_en.ko' file is on initramfs file:
# lsinitrd /boot/initramfs-3.10.*.img | grep mlx4_en
Actual results:
An empty line.
Expected results:
-rwxr--r--. 1 root root 164080 Oct 21 01:47 /lib/modules/3.10.0-327.rt56.198.el6rt.x86_64/kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko
Additional info:
The 'mlx4_en.ko' file is on initramfs file of the 2.6 kernel:
# lsinitrd /boot/initramfs-2.6.*.img | grep mlx4_en
-rwxr--r-- 1 root root 165048 May 12 17:51 lib/modules/2.6.32-642.el6.x86_64/kernel/drivers/net/mlx4/mlx4_en.ko
The dracut command was executed with verbose and debug enabled:
dracut -v --debug /boot/initramfs-3.10.0-327.rt56.190.el6rt.x86_64.new.img 3.10.0-327.rt56.190.el6rt.x86_64 &> dracut.3.output
The 'dracut.3.output' shows the call to the function 'instmods' with the correct arguments, where one of them is the 'mlx4' driver:
---- 'dracut.3.output' ----
...
4033 //usr/share/dracut/modules.d/10rdma/installkernel@2(): instmods =drivers/infiniband =drivers/net/mlx4 =drivers/net/mlx5 cxgb3 cxgb4
...
The function instmods executes the 'find' command to search for the driver on a directory:
--- '/usr/share/dracut/dracut-functions' ---
...
606 # install kernel modules along with all their dependencies.
607 instmods() {
608 [[ $no_kernel = yes ]] && return
609 local mod mpargs modpath modname cmd
610 local ret=0
611 while (($# > 0)); do
612 mod=${1%.ko*}
613 case $mod in
614 =*) # This introduces 2 incompatible meanings for =* arguments
615 # to instmods. We need to decide which one to keep.
616 if [[ $mod = =ata && -f $srcmods/modules.block ]] ; then
617 instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules. block")
618 elif [ -f $srcmods/modules.${mod#=} ]; then
619 instmods $mpargs $(cat ${srcmods}/modules.${mod#=} )
620 else
621 instmods $mpargs $(find "$srcmods" -path "*/${mod#=}/*") <--------------------- HERE
622 fi
623 ;;
...
The 'find' command works for 2.6 kernel, but it fails for 3.10 kernel, there is no argument on line #7544:
...
7543 ///usr/share/dracut/dracut-functions@621(instmods): find /lib/modules/3.10.0-327.rt56.190.el6rt.x 86_64/ -path '*/drivers/net/mlx4/*'
7544 //usr/share/dracut/dracut-functions@621(instmods): instmods
7545 //usr/share/dracut/dracut-functions@608(instmods): [[ '' = yes ]]
...
The cause of the problem is that the dracut script was created to deal with 2.6 kernel, where the mlx4 kernel driver is located on directory '/lib/modules/2.6.*/kernel/drivers/net/mlx4', but the 3.10 kernel stores the mlx4 kernel driver on a 'mellanox' directory: '/lib/modules/3.10.*/kernel/drivers/net/ethernet/mellanox/mlx4'.
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://rhn.redhat.com/errata/RHBA-2017-0688.html
Description of problem: The dracut scripts fail to insert the mlx4_en module in iniramfs file when the kernel is a 3.10 kernel-rt. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Install a normal RHEL 6.8 system and register it: subscription-manager register --auto-attach 2. Install a 3.10 kernel-rt support, for example: yum -y --enablerepo rhel-6-server-realtime-rpms groupinstall "MRG Realtime" 3. Check if the 'mlx4_en.ko' file is on initramfs file: # lsinitrd /boot/initramfs-3.10.*.img | grep mlx4_en Actual results: An empty line. Expected results: -rwxr--r--. 1 root root 164080 Oct 21 01:47 /lib/modules/3.10.0-327.rt56.198.el6rt.x86_64/kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko Additional info: The 'mlx4_en.ko' file is on initramfs file of the 2.6 kernel: # lsinitrd /boot/initramfs-2.6.*.img | grep mlx4_en -rwxr--r-- 1 root root 165048 May 12 17:51 lib/modules/2.6.32-642.el6.x86_64/kernel/drivers/net/mlx4/mlx4_en.ko The dracut command was executed with verbose and debug enabled: dracut -v --debug /boot/initramfs-3.10.0-327.rt56.190.el6rt.x86_64.new.img 3.10.0-327.rt56.190.el6rt.x86_64 &> dracut.3.output The 'dracut.3.output' shows the call to the function 'instmods' with the correct arguments, where one of them is the 'mlx4' driver: ---- 'dracut.3.output' ---- ... 4033 //usr/share/dracut/modules.d/10rdma/installkernel@2(): instmods =drivers/infiniband =drivers/net/mlx4 =drivers/net/mlx5 cxgb3 cxgb4 ... The function instmods executes the 'find' command to search for the driver on a directory: --- '/usr/share/dracut/dracut-functions' --- ... 606 # install kernel modules along with all their dependencies. 607 instmods() { 608 [[ $no_kernel = yes ]] && return 609 local mod mpargs modpath modname cmd 610 local ret=0 611 while (($# > 0)); do 612 mod=${1%.ko*} 613 case $mod in 614 =*) # This introduces 2 incompatible meanings for =* arguments 615 # to instmods. We need to decide which one to keep. 616 if [[ $mod = =ata && -f $srcmods/modules.block ]] ; then 617 instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules. block") 618 elif [ -f $srcmods/modules.${mod#=} ]; then 619 instmods $mpargs $(cat ${srcmods}/modules.${mod#=} ) 620 else 621 instmods $mpargs $(find "$srcmods" -path "*/${mod#=}/*") <--------------------- HERE 622 fi 623 ;; ... The 'find' command works for 2.6 kernel, but it fails for 3.10 kernel, there is no argument on line #7544: ... 7543 ///usr/share/dracut/dracut-functions@621(instmods): find /lib/modules/3.10.0-327.rt56.190.el6rt.x 86_64/ -path '*/drivers/net/mlx4/*' 7544 //usr/share/dracut/dracut-functions@621(instmods): instmods 7545 //usr/share/dracut/dracut-functions@608(instmods): [[ '' = yes ]] ... The cause of the problem is that the dracut script was created to deal with 2.6 kernel, where the mlx4 kernel driver is located on directory '/lib/modules/2.6.*/kernel/drivers/net/mlx4', but the 3.10 kernel stores the mlx4 kernel driver on a 'mellanox' directory: '/lib/modules/3.10.*/kernel/drivers/net/ethernet/mellanox/mlx4'.