Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796470 - sys-kernel/dracut-055: NetworkManager fails to start in initrd because D-Bus policy is not found
Summary: sys-kernel/dracut-055: NetworkManager fails to start in initrd because D-Bus ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on: 796467
Blocks:
  Show dependency tree
 
Reported: 2021-06-17 09:59 UTC by Manuel Nickschas
Modified: 2021-12-27 16:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Nickschas 2021-06-17 09:59:54 UTC
Dracut expects NetworkManager's D-Bus policy file to be installed in /usr/share/dbus-1/system.d. However, Gentoo's NetworkManager package installs the file in /etc/dbus-1/system.d instead. This results in the following error when building the initrd:

dracut: *** Including module: network-manager ***
dracut-install: ERROR: installing '/usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.0t7igV/initramfs /usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf

Building the initrd succeeds anyway, but network does not become available during boot as the policy file cannot be found and NetworkManager cannot start up. This breaks features like remote unlocking via crypt-ssh that rely on network being available during initrd time.

I have filed https://bugs.gentoo.org/796467 for tracking the unexpected location of the policy file, as I'm not sure where this should be fixed in the end (probably it would be a good idea if Dracut were a bit more robust and would also take user configuration in /etc into account either way).

Reproducible: Always

Steps to Reproduce:
1. Configure Dracut to include the network-manager module (direct or transitively e.g. via the crypt-ssh module)
2. Build initrd

Actual Results:  
Error messages during build (non-fatal for some reason):

dracut: *** Including module: network-manager ***
dracut-install: ERROR: installing '/usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.0t7igV/initramfs /usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf

As a result, no network on boot during the initrd phase.

Expected Results:  
No warnings/errors related to the network-manager module.

Network is up and running during initrd, before the password prompt so features like crypt-ssh work.

I have manually hacked /usr/lib/dracut/modules.d/35network-manager/module-setup.sh to use the "correct" path into /etc, and can confirm that with that change, everything works as expected.

Bug https://bugs.gentoo.org/796467 filed to track unexpected position of the policy file.
Comment 1 Mike Gilbert gentoo-dev 2021-06-17 15:52:39 UTC
Adding upstream issue.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2021-08-26 16:25:20 UTC
should be fixed in networkmanager-1.32.10 via https://bugs.gentoo.org/show_bug.cgi?id=796467