From b8af0cd0b91d2f19e0f222364f34e19bef36d918 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Tue, 30 Jul 2024 15:38:58 -0600 Subject: [PATCH] test: workaround a systemd issue in el10 restarting journald Due to https://github.com/systemd/systemd/pull/33874 we need to clear the SubState=dead-resources-pinned of journald when restarting it after the test. Signed-off-by: Rich Megginson --- tests/tests_imuxsock_files.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/tests_imuxsock_files.yml b/tests/tests_imuxsock_files.yml index 86e5f26a..09b04a8d 100644 --- a/tests/tests_imuxsock_files.yml +++ b/tests/tests_imuxsock_files.yml @@ -112,12 +112,17 @@ # odd idiosyncrasies - name: Restart journald units shell: | + set -euxo pipefail + exec 1>&2 for service in {{ __journald_units | join(" ") }}; do if systemctl is-active "$service"; then systemctl stop "$service" || : sleep 1 fi done + if [ "$(systemctl show -p SubState systemd-journald.service)" = SubState=dead-resources-pinned ]; then + systemctl clean --what fdstore systemd-journald.service + fi for service in {{ __journald_units | join(" ") }}; do if ! systemctl is-active "$service"; then systemctl start "$service"