1
0
mirror of https://github.com/systemd/systemd synced 2025-10-03 10:44:44 +02:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Luca Boccassi
5e38d199a6 meson: bump version to 257.8 2025-08-05 16:31:37 +01:00
Daan De Meyer
b6ca95740d units: Order systemd-oomd after systemd-sysusers
systemd-sysusers might create the systemd-oom system user that
systemd-oomd runs under so let's order systemd-oomd after
systemd-sysusers.

(cherry picked from commit 36dd4296806b5541eb67cd13c535eb0fe3213121)
2025-08-05 17:24:45 +02:00
Yu Watanabe
2989595155 TEST-74-AUX-UTILS: fail earlier when systemd-run fail to reconnect to bus
Note, the default timeout for systemctl daemon-reload is 270 seconds.
Hence, 300 seconds should be enough.

(cherry picked from commit 07355061db88d95b81cfdc3510eb57a0940daac1)
2025-08-05 17:24:45 +02:00
Yu Watanabe
08b9cf43ea TEST-23-UNIT-FILE: skip verifying masked unit
This fixes the following failure:
TEST-23-UNIT-FILE.sh[2408]: + systemd-analyze --recursive-errors=no --man=no verify /usr/lib/systemd/system/sysinit.target.wants/systemd-hwdb-update.service
systemd-analyze[2737]: sys-kernel-config.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: proc-sys-fs-binfmt_misc.automount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: dev-hugepages.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: sys-kernel-tracing.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: sys-kernel-debug.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: sys-fs-fuse-connections.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: dev-mqueue.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: Unit systemd-hwdb-update.service is masked.
TEST-23-UNIT-FILE.sh[166]: + :
TEST-23-UNIT-FILE.sh[166]: + kill -0 2408
TEST-23-UNIT-FILE.sh[166]: + wait 2408
TEST-23-UNIT-FILE.sh[166]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE.verify-unit-files.sh failed'
TEST-23-UNIT-FILE.sh[166]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE.verify-unit-files.sh failed

(cherry picked from commit e5e7cc9a98155b031d9855527da08ac87617f427)
2025-08-05 17:24:45 +02:00
Yu Watanabe
7d5b7f234f TEST-64-UDEV-STORAGE: mdadm --zero-superblock seems to not support symlink
On CentOS 9:
```
TEST-64-UDEV-STORAGE.sh[522]: + mdadm -v --zero-superblock --force /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm0 ...
TEST-64-UDEV-STORAGE.sh[1014]: mdadm: Unrecognised md component device - /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm4
```

This also adds `udevadm settle` before clearing superblocks for safety.

Follow-up for 5ad6fe9850e0ecad7415bfbdd547d07b9b1177c7.

(cherry picked from commit 3d4977a12b0ed298c02fb3b757961de3229ce025)
2025-08-05 17:24:45 +02:00
5 changed files with 16 additions and 5 deletions

View File

@ -1 +1 @@
257.7 257.8

View File

@ -41,5 +41,12 @@ for unit_file in "${UNIT_FILES[@]}"; do
continue continue
fi fi
# Skip masked unit files
resolved=$(readlink -f "$unit_file")
if [[ "$resolved" == "/dev/null" || "$(systemctl is-enabled "${resolved##*/}" 2>/dev/null || :)" == "masked" ]]; then
echo "$unit_file is masked, skipping"
continue
fi
systemd-analyze --recursive-errors=no --man=no verify "$unit_file" systemd-analyze --recursive-errors=no --man=no verify "$unit_file"
done done

View File

@ -1259,7 +1259,9 @@ EOF
# Clear superblocks to make the MD device will not be restarted even if the VM is restarted. # Clear superblocks to make the MD device will not be restarted even if the VM is restarted.
# This is a workaround for issue #38240. # This is a workaround for issue #38240.
mdadm -v --zero-superblock --force "${devices[@]}" udevadm settle --timeout=30
# shellcheck disable=SC2046
mdadm -v --zero-superblock --force $(readlink -f "${devices[@]}")
udevadm settle --timeout=30 udevadm settle --timeout=30
# Check if all expected symlinks were removed after the cleanup # Check if all expected symlinks were removed after the cleanup
@ -1322,7 +1324,9 @@ testcase_mdadm_lvm() {
# Clear superblocks to make the MD device will not be restarted even if the VM is restarted. # Clear superblocks to make the MD device will not be restarted even if the VM is restarted.
# This is a workaround for issue #38240. # This is a workaround for issue #38240.
mdadm -v --zero-superblock --force "${devices[@]}" udevadm settle --timeout=30
# shellcheck disable=SC2046
mdadm -v --zero-superblock --force $(readlink -f "${devices[@]}")
udevadm settle --timeout=30 udevadm settle --timeout=30
# Check if all expected symlinks were removed after the cleanup # Check if all expected symlinks were removed after the cleanup

View File

@ -280,4 +280,4 @@ if [[ -e /usr/lib/pam.d/systemd-run0 ]] || [[ -e /etc/pam.d/systemd-run0 ]]; the
fi fi
# Tests whether intermediate disconnects corrupt us (modified testcase from https://github.com/systemd/systemd/issues/27204) # Tests whether intermediate disconnects corrupt us (modified testcase from https://github.com/systemd/systemd/issues/27204)
assert_rc "37" systemd-run --unit=disconnecttest --wait --pipe --user -M testuser@.host bash -ec 'systemctl --user daemon-reexec; sleep 3; exit 37' assert_rc "37" timeout 300 systemd-run --unit=disconnecttest --wait --pipe --user -M testuser@.host bash -ec 'systemctl --user daemon-reexec; sleep 3; exit 37'

View File

@ -20,7 +20,7 @@ ConditionPathExists=/proc/pressure/cpu
ConditionPathExists=/proc/pressure/io ConditionPathExists=/proc/pressure/io
ConditionPathExists=/proc/pressure/memory ConditionPathExists=/proc/pressure/memory
Requires=systemd-oomd.socket Requires=systemd-oomd.socket
After=systemd-oomd.socket After=systemd-oomd.socket systemd-sysusers.service
[Service] [Service]
AmbientCapabilities=CAP_KILL CAP_DAC_OVERRIDE AmbientCapabilities=CAP_KILL CAP_DAC_OVERRIDE