From c2e797bbb23424ffbe9afd4ba9bc1a107c0a9b5e Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Tue, 10 Sep 2024 14:13:04 -0600 Subject: [PATCH] test: restart dbus broker after restarting journald Restarting journald seems to break the ability of dbus to configure policy for newly installed services. Restarting dbus broker seems to fix that. Signed-off-by: Rich Megginson --- tests/tests_imuxsock_files.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/tests_imuxsock_files.yml b/tests/tests_imuxsock_files.yml index 09b04a8d..2e527a98 100644 --- a/tests/tests_imuxsock_files.yml +++ b/tests/tests_imuxsock_files.yml @@ -129,6 +129,17 @@ sleep 1 fi done + # dbus needs to be restarted after journald or services will not be able to + # listen for dbus + for service in dbus dbus-broker; do + if systemctl is-active "$service"; then + systemctl restart "$service" || { systemctl status "$service" || :; journalctl -ex; } + fi + done + # ensure journal is working again + logger tests_imuxsock_files_ensure_journal_working + sleep 1 + journalctl -ex | grep tests_imuxsock_files_ensure_journal_working changed_when: true vars: __journald_units: