From: Vasek Sraier Date: Mon, 14 Mar 2022 20:14:02 +0000 (+0100) Subject: manager: systemd: lower unit start timeout to 10 seconds from 30 X-Git-Tag: v6.0.0a1~39^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0afdb86d01031de66d8509a9afb473aed812cd8;p=thirdparty%2Fknot-resolver.git manager: systemd: lower unit start timeout to 10 seconds from 30 This is done after a short discussion on Slack where we've learnt that kresd should be up and running within fraction of a second. --- diff --git a/manager/knot_resolver_manager/kresd_controller/systemd/dbus_api.py b/manager/knot_resolver_manager/kresd_controller/systemd/dbus_api.py index 51afef52a..4f0c03672 100644 --- a/manager/knot_resolver_manager/kresd_controller/systemd/dbus_api.py +++ b/manager/knot_resolver_manager/kresd_controller/systemd/dbus_api.py @@ -55,7 +55,7 @@ def _create_manager_proxy(type_: SystemdType) -> Any: return _create_object_proxy(type_, ".systemd1") -def _wait_for_job_completion(systemd: Any, job_creating_func: Callable[[], str], timeout_sec: int = 30) -> None: +def _wait_for_job_completion(systemd: Any, job_creating_func: Callable[[], str], timeout_sec: int = 10) -> None: """ Takes a function returning a systemd job path, executes it while simultaneously waiting for its completion. This prevents race conditions. @@ -251,7 +251,7 @@ def start_transient_kresd_unit(config: KresConfig, type_: SystemdType, kres_id: _wait_for_job_completion(systemd, job) except SubprocessControllerTimeoutException: logger.error( - f"Failed to start transient '{name}'." "The start operation did not finish within the expected timeframe" + f"Failed to start transient '{name}'. The start operation did not finish within the expected timeframe" ) raise except SubprocessControllerException as e: