From 794aa5f57f616d1fd3d0ad803f5e7594c33391a0 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 12 Jan 2022 08:16:45 +0100 Subject: [PATCH 1/2] units: don't install dbus-org.freedesktop.oom1.service alias The systemd-oomd.service unit contains [Install] WantedBy=multi-user.target Alias=dbus-org.freedesktop.oom1.service which means the symlink is supposed to be created dynamically when the service is enabled. --- units/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/units/meson.build b/units/meson.build index a9bf28f6d9..3184433b8f 100644 --- a/units/meson.build +++ b/units/meson.build @@ -221,8 +221,7 @@ in_units = [ ['systemd-networkd.service', 'ENABLE_NETWORKD'], ['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD'], ['systemd-nspawn@.service', ''], - ['systemd-oomd.service', 'ENABLE_OOMD', - 'dbus-org.freedesktop.oom1.service'], + ['systemd-oomd.service', 'ENABLE_OOMD'], ['systemd-portabled.service', 'ENABLE_PORTABLED', 'dbus-org.freedesktop.portable1.service'], ['systemd-userdbd.service', 'ENABLE_USERDB'], From d338b1713aabcdc2f90d907c72f8fada085bb15e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 12 Jan 2022 12:29:34 +0100 Subject: [PATCH 2/2] test: enable systemd-oomd.service Enable the service to ensure dbus-org.freedesktop.oom1.service exists and D-Bus activation works. See #18469 --- test/units/testsuite-55.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/units/testsuite-55.sh b/test/units/testsuite-55.sh index f0837d22a3..009933e665 100755 --- a/test/units/testsuite-55.sh +++ b/test/units/testsuite-55.sh @@ -35,6 +35,10 @@ echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" >/etc/systemd/system/sy systemctl daemon-reload +# enable the service to ensure dbus-org.freedesktop.oom1.service exists +# and D-Bus activation works +systemctl enable systemd-oomd.service + # if oomd is already running for some reasons, then restart it to make sure the above settings to be applied if systemctl is-active systemd-oomd.service; then systemctl restart systemd-oomd.service