Bug 2054092

Summary: dracut fails with module 'network-legacy' cannot be found or installed.
Product: Red Hat Enterprise Linux 8 Reporter: Lars <ggunx01>
Component: dracutAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, dracut-maint-list, dtardon, jamacku, jwboyer, kdudka, lnykryn
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-24 11:22:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lars 2022-02-14 07:14:26 UTC
Description of problem:

dracut fails with module 'network-legacy' cannot be found or installed after upgrading from 049-191.git20210920.el8 to 049-201.git20220131.el8.


Version-Release number of selected component (if applicable):
dracut-network-049-201.git20220131.el8.x86_64
dracut-squash-049-201.git20220131.el8.x86_64
dracut-049-201.git20220131.el8.x86_64



Steps to Reproduce:
1. Create an /etc/dracut.conf.d/50-network-legacy.conf file which might be exist on upgraded/patched systems.

$ cat /etc/dracut.conf.d/50-network-legacy.conf
# Since rhel-8.3 dracut moved to use NetworkManager
# On existing installations we want to preserve the old scripts
add_dracutmodules+=" network-legacy "

2. Update dracut
3. dracut -f

Actual results:
$ sudo dracut -f
dracut: dracut module 'network-legacy' cannot be found or installed.

Expected results:
dracut builds the initramfs


Additional info:
This might be related https://bugzilla.redhat.com/show_bug.cgi?id=2007312 but it happens even with installed dracut-network package.

Removing the file fixes the issue.

Comment 1 David Tardon 2022-02-24 11:22:05 UTC
"dracut -v /tmp/initrd" tells me that "dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!". That is only possible because we dropped hard dependency on dhclient from dracut-network (bug 1916174); it requires NetworkManager or dhclient now with a preference for NetworkManager. However, that change doesn't mean the package is uninstalled during update. The CentOS Stream installation I tried this on initially is relatively fresh, so it hadn't had dhclient installed in the first place (neither it did contain /etc/dracut.conf.d/50-network-legacy.conf--I created that manually). I tried to update an RHEL 8.3 installation via 8.4 and 8.5 to the latest 8.6 compose and dhclient remains installed.

Conclusion: this issue seem to require a manual removal of dhclient, therefore it's not our bug.

Comment 2 Lars 2022-02-25 08:43:15 UTC
Thanks for the Explanation!

Looks like we hit an special case, we removed the dhcp-client package some time ago because of an dependency issue as we don't use dhcp.

2022-01-28T21:15:08+0100 CRITICAL Error: 
 Problem: package dhcp-client-12:4.3.6-47.el8.x86_64 requires libdns-export.so.1112()(64bit), but none of the providers can be installed
  - cannot install both bind-export-libs-32:9.11.36-2.el8.x86_64 and bind-export-libs-32:9.11.26-6.el8.x86_64
  - cannot install both bind-export-libs-32:9.11.36-2.el8.x86_64 and bind-export-libs-32:9.11.26-3.el8.x86_64
  - cannot install both bind-export-libs-32:9.11.36-2.el8.x86_64 and bind-export-libs-32:9.11.26-4.el8_4.x86_64
  - cannot install the best update candidate for package dhcp-client-12:4.3.6-45.el8.x86_64
  - cannot install the best update candidate for package bind-export-libs-32:9.11.26-6.el8.x86_64

Comment 3 Kamil Dudka 2022-03-17 12:31:07 UTC
After I upgraded my Covscan stage VM to RHEL-8.5, it failed to boot because there was no initrd for the last installed kernel.   So I tried to reinstall the last kernel and see:

# yum reinstall kernel\*-4.18.0-348.20.1.el8_5.x86_64
[...]
  Running scriptlet: kernel-core-4.18.0-348.20.1.el8_5.x86_64                           14/14
dracut: dracut module 'network-legacy' cannot be found or installed.
warning: %posttrans(kernel-core-4.18.0-348.20.1.el8_5.x86_64) scriptlet failed, exit status 1

Error in POSTTRANS scriptlet in rpm package kernel-core


Is it related to this (not a) bug?

How can I make the system bootable and upgradable again?

Comment 4 Kamil Dudka 2022-03-23 12:46:19 UTC
As suggested by Lukas, removing /etc/dracut.conf.d/50-network-legacy.conf made the problem go away.