Skip to content

Commit

Permalink
test: restart dbus broker after restarting journald
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
richm committed Sep 11, 2024
1 parent bbe1751 commit 2d383f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/tests_imuxsock_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2d383f1

Please sign in to comment.