sys-daemon & sys-service: align timeout handling

- Updated sys-daemon defaults:
  * Increased SYSTEMD_DEFAULT_TIMEOUT_START to 24h
  * Improved inline comments for clarity
- Changed sys-service vars:
  * Removed hardcoded 60s TimeoutStartSec
  * Now empty by default → inherits manager defaults from sys-daemon

See: https://chatgpt.com/share/68ade432-67f8-800f-b6c2-b8f87764479b
This commit is contained in:
Kevin Veen-Birkenbach 2025-08-26 18:48:45 +02:00
parent af97e71976
commit 35c3681f55
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
3 changed files with 7 additions and 7 deletions

View File

@ -1,8 +1,7 @@
# General # General
SYSTEMD_MANAGER_CONF_DIR: "/etc/systemd/system.conf.d" SYSTEMD_MANAGER_CONF_DIR: "/etc/systemd/system.conf.d" # Directory for systemd manager drop-in configuration files
# Defaults
SYSTEMD_DEFAULT_TIMEOUT_START: "90s" # Maximum time a service is allowed to reach the 'active' state during startup
SYSTEMD_DEFAULT_TIMEOUT_STOP: "90s" # Maximum time a service is allowed to stop gracefully before being killed
SYSTEMD_DEFAULT_TIMEOUT_ABORT: "90s" # Additional grace period after Stop timeout before systemd sends SIGKILL
# Defaults (system-wide service timeouts)
SYSTEMD_DEFAULT_TIMEOUT_START: "24h" # How long systemd waits for a service to reach the "active" state during startup
SYSTEMD_DEFAULT_TIMEOUT_STOP: "90s" # How long systemd waits for a service to stop gracefully after receiving a stop command
SYSTEMD_DEFAULT_TIMEOUT_ABORT: "90s" # Extra grace period after the stop timeout expires, before systemd sends SIGKILL to force termination

View File

@ -1,6 +1,7 @@
- name: Include dependency 'sys-daemon' - name: Include dependency 'sys-daemon'
include_role: include_role:
name: sys-daemon name: sys-daemon
public: true
when: run_once_sys_daemon is not defined when: run_once_sys_daemon is not defined
- name: "reset (if enabled)" - name: "reset (if enabled)"

View File

@ -24,4 +24,4 @@ system_service_tpl_runtime: "{{ '' if system_service_tpl_type == 'ones
system_service_tpl_exec_start_pre: "" system_service_tpl_exec_start_pre: ""
system_service_tpl_exec_start: "{{ system_service_script_exec }}" system_service_tpl_exec_start: "{{ system_service_script_exec }}"
system_service_tpl_exec_start_post: "" system_service_tpl_exec_start_post: ""
system_service_tpl_timeout_start_sec: "60s" system_service_tpl_timeout_start_sec: "" # If not defined the default values from sys-daemon in manager will be used