Improve D-Bus timeout error handling (#5664)

* Improve D-Bus timeout error handling

Typically D-Bus timeouts are related to systemd activation timing out
after 25s. The current dbus-fast timeout of 10s is well below that
so we never get the actual D-Bus error. This increases the dbus-fast
timeout to 30s, which will make sure we wait long enought to get the
actual D-Bus error from the broker.

Note that this should not slow down a typical system, since we tried
three times each waiting for 10s. With the new error handling typically
we'll end up waiting 25s and then receive the actual D-Bus error. There
is no point in waiting for multiple D-Bus/systemd caused timeouts.

* Create D-Bus TimedOut exception
This commit is contained in:
Stefan Agner
2025-02-25 17:11:23 +01:00
committed by GitHub
parent 644ec45ded
commit 15e8940c7f
4 changed files with 25 additions and 11 deletions

View File

@@ -403,7 +403,11 @@ class DBusParseError(DBusError):
class DBusTimeoutError(DBusError):
"""D-Bus call timed out."""
"""D-Bus call timeout."""
class DBusTimedOutError(DBusError):
"""D-Bus call timed out (typically when systemd D-Bus service activation fail)."""
class DBusNoReplyError(DBusError):