-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Default presets contain contradicting policies #25459
Copy link
Copy link
Closed
Labels
bug 🐛Programming errors, that need preferential fixingProgramming errors, that need preferential fixingnetworksystemctlunits
Description
systemd version the issue has been seen with
252
Used distribution
ArchLinux / AsahiLinux
Linux kernel version used
6.1.0-rc5-asahi-11-1-ARCH
CPU architectures issue was seen on
aarch64
Component
systemd
Expected behaviour you didn't see
If I run systemctl preset-all twice in a row, the second run should change nothing.
Unexpected behaviour you saw
The second run always disables and re-enabled some units. This adds noise trying to interpret the output of preset-all (e.g.: it seems that changes were made when they are not).
Steps to reproduce the problem
systemctl preset-all
The issue stems from presets/90-systemd.preset, which contains the following two lines:
enable systemd-networkd.service
disable systemd-networkd-wait-online.service
But systemd-networkd.service includes:
Also=systemd-networkd-wait-online.service
This results in systemd-networkd-wait-online.service being disabled and re-enabled every time presets run. There are in total three instances of this "quirk", so systemd preset-all will print out six lines of changes which are effectively no-op every time it gets run.
Additional program output to the terminal or log subsystem illustrating the issue
> sudo systemctl preset-all
Removed "/etc/systemd/system/sockets.target.wants/systemd-networkd.socket".
Removed "/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service".
Removed "/etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service".
Created symlink /etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service → /usr/lib/systemd/system/systemd-homed-activate.service.
Created symlink /etc/systemd/system/sockets.target.wants/systemd-networkd.socket → /usr/lib/systemd/system/systemd-networkd.socket.
Created symlink /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service → /usr/lib/systemd/system/systemd-networkd-wait-online.service.
> sudo systemctl preset-all
Removed "/etc/systemd/system/sockets.target.wants/systemd-networkd.socket".
Removed "/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service".
Removed "/etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service".
Created symlink /etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service → /usr/lib/systemd/system/systemd-homed-activate.service.
Created symlink /etc/systemd/system/sockets.target.wants/systemd-networkd.socket → /usr/lib/systemd/system/systemd-networkd.socket.
Created symlink /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service → /usr/lib/systemd/system/systemd-networkd-wait-online.service.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🐛Programming errors, that need preferential fixingProgramming errors, that need preferential fixingnetworksystemctlunits