Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network module has transitive dependency on systemd #1756

Closed
HackingM opened this issue Mar 21, 2022 · 17 comments · Fixed by #2181
Closed

network module has transitive dependency on systemd #1756

HackingM opened this issue Mar 21, 2022 · 17 comments · Fixed by #2181
Labels
bug Our bugs gentoo Issue tracker for the Gentoo distribution network Issues related to the network module

Comments

@HackingM
Copy link

HackingM commented Mar 21, 2022

When using the network module, or any module which depends on it, on an OpenRC system the network module cannot be installed.

dracut: dracut module 'dbus-daemon' depends on 'systemd', which can't be installed
dracut: dracut module 'dbus' depends on 'dbus-daemon', which can't be installed
dracut: dracut module 'network-manager' depends on 'dbus', which can't be installed
dracut: dracut module 'network' depends on 'network-manager', which can't be installed

This applies to all Dracut versions >= 54

Presumably there should be some way of using the network module without systemd.

@HackingM HackingM added the bug Our bugs label Mar 21, 2022
@dtardon
Copy link
Contributor

dtardon commented Mar 22, 2022

When using the network module, or any module which depends on it, on an OpenRC system the network module cannot be installed.

dracut: dracut module 'dbus-daemon' depends on 'systemd', which can't be installed
dracut: dracut module 'dbus' depends on 'dbus-daemon', which can't be installed
dracut: dracut module 'network-manager' depends on 'dbus', which can't be installed
dracut: dracut module 'network' depends on 'network-manager', which can't be installed

I'm afraid have bad news for you. The network module is built around NetworkManager, so if you don't have that, the fact that the module needs systemd is the least of your problems... You might want network-legacy instead.

This applies to all Dracut versions >= 54

Presumably there should be some way of using the network module without systemd.

No, there shouldn't. The change to start NetworkManager via a service has been intentional. Let's not go back.

@HackingM
Copy link
Author

HackingM commented Mar 22, 2022

When using the network module, or any module which depends on it, on an OpenRC system the network module cannot be installed.

dracut: dracut module 'dbus-daemon' depends on 'systemd', which can't be installed
dracut: dracut module 'dbus' depends on 'dbus-daemon', which can't be installed
dracut: dracut module 'network-manager' depends on 'dbus', which can't be installed
dracut: dracut module 'network' depends on 'network-manager', which can't be installed

I'm afraid have bad news for you. The network module is built around NetworkManager, so if you don't have that, the fact that the module needs systemd is the least of your problems... You might want network-legacy instead.

This applies to all Dracut versions >= 54
Presumably there should be some way of using the network module without systemd.

No, there shouldn't. The change to start NetworkManager via a service has been intentional. Let's not go back.

Fair enough. Is there any way to specify that either network or network-legacy would work or do we have to maintain two different packages (with different output in depends()) now?

@johannbg
Copy link
Collaborator

The network module is just a meta module that pulls in dependency on what's installed so I'm not following what you are referring to. ( @dtardon the network module is not spesifically built around NM, that's just nonsense )

You use a meta module if an distribution provides multiple components that provide the same solutions like for example Fedora who ships both systemd's networkd and NetworkManager ( as well as iwd ) or if you want to have the same dracut configuration between multiple distribution

Currently there is no other option for none dbus/systemd based system to use anything other than the network legacy module ( that might change if I ever find the time to implement the IWD module but most likely network-legacy would get dropped at that point ) and each module should be package downstream independently in a separate sub-component either of dracut or relevant component it represents with correct dependency on that component but distribution package things as they see fit, not what is technically correct thing to do.

Implementing these network solutions in the wild can be somewhat complex since

iwd can be used standalone, with or without dbus, with NM and with systemd's networkd and with NM+networkd.
NM can be used standalone with dbus support, with iwd, with networkd and with iwd+networkd ( it cannot be used without dbus )

networkd can be used standalone, mostly without dbus I think and with NM and IWD.
etc.

@HackingM
Copy link
Author

The network module is just a meta module that pulls in dependency on what's installed so I'm not following what you are referring to.

OK, that makes sense. It seems that on an OpenRC Gentoo system these tests fail and always select systemd-networkd, even though systemd is not installed.

Adding

omit_dracutmodules+=" systemd systemd-networkd "
add_dracutmodules+=" network-legacy "

to dracut.conf seems to be a workaround.

@LaszloGombos
Copy link
Collaborator

@HackingM

Curious, if just adding this one line (instead of two lines) would also be a workaround ?

add_dracutmodules+=" network-legacy "

@motorto
Copy link

motorto commented Nov 18, 2022

The same happens on a runit init system: voidlinux:

void-linux/void-mklive#296

LOG
dracut: Executing: /usr/bin/dracut -N --xz --add-drivers ahci --force-add "vmklive autoinstaller" --omit systemd /boot/initrd 5.19.17_1
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'dbus-daemon' depends on 'systemd', which can't be installed
dracut: dracut module 'dbus' depends on 'dbus-daemon', which can't be installed
dracut: dracut module 'network-manager' depends on 'dbus', which can't be installed
dracut: dracut module 'network' depends on 'network-manager', which can't be installed
dracut: dracut module 'autoinstaller' depends on 'network', which can't be installed
dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'url-lib' will not be installed, because command 'curl' could not be found!
dracut: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nbd' will not be installed, because command 'nbd-client' could not be found!
dracut: 95nfs: Could not find any command of 'rpcbind portmap'!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: dracut module 'autoinstaller' cannot be found or installed.
ERROR: Failed to generate the initramfs

@johannbg
Copy link
Collaborator

@motorto which release of dracut is void running these days? Also does void ship iwd?

@motorto
Copy link

motorto commented Nov 18, 2022

@motorto which release of dracut is void running these days? Also does void ship iwd?

Recently bumped to 056 (yesterday , 053 --> 056)

Yes "we" do ship iwd. (void does, I am not one of the core members)

@johannbg
Copy link
Collaborator

Just checking since probably at the same time I land the iwd module we probably drop support for legacy network setups.

@motorto
Copy link

motorto commented Nov 18, 2022

But we are currently using NetworkManager on our live isos

@johannbg
Copy link
Collaborator

The legacy network is the ifcfg files which I think NM has already dropped support for but continuing using NM should be just fine.
In anycase iwd works just fine with NM, connman and sd-networkd or without it ( standalone ) as well as to replace the legacy wpa_supplicant stuff

@LaszloGombos
Copy link
Collaborator

@motorto

But we are currently using NetworkManager on our live isos

Can you confirm if you're using "network-manager" or "network-legacy" dracut module ?

@motorto
Copy link

motorto commented Nov 28, 2022

@motorto

But we are currently using NetworkManager on our live isos

Can you confirm if you're using "network-manager" or "network-legacy" dracut module ?

Is there an easy way to list all enabled modules ?

@aafeijoo-suse
Copy link
Member

Is there an easy way to list all enabled modules ?

lsinitrd -m

@LaszloGombos LaszloGombos added the network Issues related to the network module label Nov 29, 2022
@LaszloGombos
Copy link
Collaborator

@motorto At least from this log it seems it is actually network-legacy

@LaszloGombos LaszloGombos added the gentoo Issue tracker for the Gentoo distribution label Dec 7, 2022
@LaszloGombos
Copy link
Collaborator

LaszloGombos commented Dec 22, 2022

For the benefit of people tracking this bug here is a summary of the current state: This issue reported independently by both the Gentoo and Void Linux community, It has been agreed that this is a regression in the network meta module on a non-systemd host using Dracut versions >= 54 (2021-May).

20fd7ed would have provided a solution that would have resolved the issue upstream both for Gentoo and Void Linux for the network meta module without creating additional maintenance burden on the upstream project. Distributions are encouraged to carry this patch downstream to work around this problem.

To summarize the discussion on #2081 the fix provided does not resolve the case for "nm without systemd modules". This issue is stalled until someone invests time solving the "nm without systemd modules" case.

NetworkManager dropped support for configure-and-quit command line option in version 1.36 (https://github.com/NetworkManager/NetworkManager/blob/main/NEWS#L206).
Dropping this feature means that NetworkManager now has a dependency on dbus. This means that "nm without systemd modules" requires changes to dbus dracut module system as well.

Until then dracut will continue to ship with this regression open. It has been decided that solving the "nm without systemd modules" case is more important than addressing the the current regression in network dracut module. It is also implied that dracut upstream is open to make all these changes to resolve the "nm without systemd modules" support.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Dec 25, 2022
Bug: dracutdevs/dracut#1756
Signed-off-by: Laszlo Gombos <laszlo.gombos@gmail.com>
Closes: #28777
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
@LaszloGombos
Copy link
Collaborator

LaszloGombos commented Jan 18, 2023

The network module is just a meta module that pulls in dependency on what's installed

Sadly it seems to do a poor job discovering what is installed and it pulls in dracut modules that are not installed in the system. It seems the network module is slowing down the adaption of dracut itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs gentoo Issue tracker for the Gentoo distribution network Issues related to the network module
Projects
None yet
6 participants