Bug 2049696 - systemd-networkd fails to start at boot
Summary: systemd-networkd fails to start at boot
Keywords:
Status: CLOSED DUPLICATE of bug 2031668
Alias: None
Product: Fedora
Classification: Fedora
Component: dbus-broker
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-02 14:53 UTC by Jon
Modified: 2022-03-04 07:44 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-04 07:44:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1948042 1 unspecified CLOSED systemd-networkd fails at system start 2022-06-08 06:33:13 UTC

Description Jon 2022-02-02 14:53:35 UTC
Description of problem: At system startup systemd-networkd fails to start when enabled. Network interfaces are not configured and the system has no network connectivity. After system is booted, networkd can be started by doing `systemctl restart systemd-networkd` or simply running `networkctl`. Interfaces will then be configured.

It appears this is a regression on a similar or same issue from Fedora 34: https://bugzilla.redhat.com/show_bug.cgi?id=1948042

I notice there are SELinux errors in the journal, which appears to be preventing networkd from connecting to dbus:

```
Feb 02 00:31:53 fedora systemd[1]: Starting Network Configuration...
Feb 02 00:31:53 fedora systemd[1]: Starting Load Kernel Module configfs...
Feb 02 00:31:53 fedora audit: BPF prog-id=33 op=LOAD
Feb 02 00:31:53 fedora audit: BPF prog-id=34 op=LOAD
Feb 02 00:31:53 fedora audit: BPF prog-id=35 op=LOAD
Feb 02 00:31:53 fedora systemd[1]: Starting User Database Manager...
Feb 02 00:31:53 fedora systemd[1]: Mounted /boot/efi.
Feb 02 00:31:53 fedora systemd[1]: modprobe: Deactivated successfully.
Feb 02 00:31:53 fedora kernel: IPMI message handler: version 39.2
Feb 02 00:31:53 fedora systemd[1]: Finished Load Kernel Module configfs.
Feb 02 00:31:53 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='u>
Feb 02 00:31:53 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='un>
Feb 02 00:31:53 fedora kernel: ipmi device interface
Feb 02 00:31:53 fedora systemd[1]: Started User Database Manager.
Feb 02 00:31:53 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='u>
Feb 02 00:31:53 fedora kernel: ipmi_si: IPMI System Interface driver
Feb 02 00:31:53 fedora kernel: ipmi_si dmi-ipmi-si.0: ipmi_platform: probing via SMBIOS
Feb 02 00:31:53 fedora kernel: ipmi_platform: ipmi_si: SMBIOS: io 0xca2 regsize 1 spacing 1 irq 0
Feb 02 00:31:53 fedora kernel: dca service started, version 1.12.1
Feb 02 00:31:53 fedora kernel: ipmi_si: Adding SMBIOS-specified kcs state machine
Feb 02 00:31:53 fedora systemd[1]: Reached target Smart Card.
Feb 02 00:31:53 fedora kernel: ipmi_si IPI0001:01: ipmi_platform: probing via ACPI
Feb 02 00:31:53 fedora kernel: ipmi_si IPI0001:01: ipmi_platform: [io  0x0ca2] regsize 1 spacing 1 irq 0
Feb 02 00:31:53 fedora kernel: ismt_smbus 0000:00:12.0: enabling device (0140 -> 0142)
Feb 02 00:31:53 fedora audit[1267]: AVC avc:  denied  { watch } for  pid=1267 comm="systemd-network" path="/" dev="dm-0" ino=256 >
Feb 02 00:31:53 fedora audit[1267]: SYSCALL arch=c000003e syscall=254 success=no exit=-13 a0=e a1=7f5270baae96 a2=180 a3=55614455>
Feb 02 00:31:53 fedora audit: PROCTITLE proctitle="/usr/lib/systemd/systemd-networkd"
Feb 02 00:31:53 fedora systemd-networkd[1267]: Failed to connect to bus: Permission denied
Feb 02 00:31:53 fedora systemd-networkd[1267]: Could not connect to bus: Permission denied
Feb 02 00:31:53 fedora systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=1/FAILURE
Feb 02 00:31:53 fedora kernel: ipmi_si dmi-ipmi-si.0: Removing SMBIOS-specified kcs state machine in favor of ACPI
Feb 02 00:31:53 fedora kernel: ipmi_si: Adding ACPI-specified kcs state machine
Feb 02 00:31:53 fedora kernel: ipmi_si: Trying ACPI-specified kcs state machine at i/o address 0xca2, slave address 0x20, irq 0
Feb 02 00:31:53 fedora kernel: ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver
Feb 02 00:31:53 fedora kernel: ixgbe: Copyright (c) 1999-2016 Intel Corporation.
Feb 02 00:31:53 fedora kernel: ipmi_si IPI0001:01: The BMC does not support clearing the recv irq bit, compensating, but the BMC >
Feb 02 00:31:53 fedora kernel: i801_smbus 0000:00:1f.4: enabling device (0001 -> 0003)
Feb 02 00:31:53 fedora systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Feb 02 00:31:53 fedora systemd[1]: Failed to start Network Configuration.
```

I added the service drop in file /etc/systemd/system/systemd-networkd.service.d/after-dbus.conf as mentioned in the previous issue from F34:

    [Unit]
    After=dbus.socket

This addition completely resolved the issue on the next boot. This appears from all information I've seen to be a repeat of the same issue seen in 34.

Version-Release number of selected component (if applicable): v249.9-1.fc35

How reproducible: seems to affect new installs reliably but existing installs do not seem 100% affected

Steps to Reproduce:
1. Install Fedora 35
2. Do not install (via kickstart) or disable NetworkManager
3. Install and enable systemd-networkd
4. Place configuration files in /etc/systemd/network
5. reboot

Actual results: networkd fails to start on boot and log


Expected results: networkd starts on system boot without additional user interaction

Comment 1 Yanko Kaneti 2022-02-02 16:55:31 UTC
You could try this pending selinux-policy update, I think it should resolve your issue.

https://bodhi.fedoraproject.org/updates/FEDORA-2022-20f36a8b0e

Comment 2 Jon 2022-03-04 02:13:09 UTC
It seems like selinux-policy-35.15-1.fc35 resolves this issue. However, what will be done to ensure this does not recur (again)? Does the selinux-policy package have a test case against systemd networkd startup during boot?

Comment 3 Zbigniew Jędrzejewski-Szmek 2022-03-04 07:44:40 UTC

*** This bug has been marked as a duplicate of bug 2031668 ***


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