Adapt to the all-at-once restart mode default in systemd_service_manager v2.0.0-0
- `install-service` no longer forces `one-by-one` restart mode - the coturn priority condition is flipped: only `one-by-one` mode needs the delayed priority (1500); all other modes (including the new `all-at-once` default) use the normal priority (900) Ref: -d42cd92045-f3e658cca3/docs/restart-mode-comparison.md-36445fb419-750cb7e29e
This commit is contained in:
@@ -238,12 +238,14 @@ matrix_addons_homeserver_systemd_services_list: "{{ ([traefik_identifier + '.ser
|
|||||||
# (see `matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled`)
|
# (see `matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled`)
|
||||||
# - core services (the homeserver) get a level of ~1000
|
# - core services (the homeserver) get a level of ~1000
|
||||||
# - services that the homeserver depends on (database, Redis, ntfy, coturn, etc.) get a lower level — between 500 and 1000
|
# - services that the homeserver depends on (database, Redis, ntfy, coturn, etc.) get a lower level — between 500 and 1000
|
||||||
# - coturn gets a higher level if `devture_systemd_service_manager_service_restart_mode == 'one-by-one'` to intentionally delay it, because:
|
# - coturn gets a higher priority level (= starts later) if `devture_systemd_service_manager_service_restart_mode == 'one-by-one'` to intentionally delay it, because:
|
||||||
# - starting services one by one means that the service manager role waits for each service to fully start before proceeding to the next one
|
# - starting services one by one means that the service manager role waits for each service to fully start before proceeding to the next one
|
||||||
# - if coturn has a lower priority than the homeserver, it would be started before it
|
# - if coturn has a lower priority than the homeserver, it would be started before it
|
||||||
# - since coturn is started before the homeserver, there's no container label telling Traefik to get a `matrix.example.com` certificate
|
# - since coturn is started before the homeserver, there's no container label telling Traefik to get a `matrix.example.com` certificate
|
||||||
# - thus, coturn would spin and wait for a certificate until it fails. We'd get a playbook failure due to it, but service manager will proceed to start all other services anyway.
|
# - thus, coturn would spin and wait for a certificate until it fails. We'd get a playbook failure due to it, but service manager will proceed to start all other services anyway.
|
||||||
# - only later, when the homeserver actually starts, would that certificate be fetched and dumped
|
# - only later, when the homeserver actually starts, would that certificate be fetched and dumped
|
||||||
|
# - this is not a problem with `all-at-once` (default) or `priority-batched` (services start concurrently),
|
||||||
|
# or with `clean-stop-start` (everything stops first, then starts in priority order — coturn at 900 is fine)
|
||||||
# - reverse-proxying services get level 3000
|
# - reverse-proxying services get level 3000
|
||||||
# - Matrix utility services (bridges, bots) get a level of 2000/2200, so that:
|
# - Matrix utility services (bridges, bots) get a level of 2000/2200, so that:
|
||||||
# - they can start before the reverse-proxy
|
# - they can start before the reverse-proxy
|
||||||
@@ -352,7 +354,7 @@ devture_systemd_service_manager_services_list_auto: |
|
|||||||
+
|
+
|
||||||
([{'name': 'matrix-corporal.service', 'priority': 1500, 'groups': ['matrix', 'corporal']}] if matrix_corporal_enabled else [])
|
([{'name': 'matrix-corporal.service', 'priority': 1500, 'groups': ['matrix', 'corporal']}] if matrix_corporal_enabled else [])
|
||||||
+
|
+
|
||||||
([{'name': 'matrix-coturn.service', 'priority': (900 if devture_systemd_service_manager_service_restart_mode == 'clean-stop-start' else 1500), 'groups': ['matrix', 'coturn']}] if matrix_coturn_enabled else [])
|
([{'name': 'matrix-coturn.service', 'priority': (1500 if devture_systemd_service_manager_service_restart_mode == 'one-by-one' else 900), 'groups': ['matrix', 'coturn']}] if matrix_coturn_enabled else [])
|
||||||
+
|
+
|
||||||
([{'name': 'matrix-matrixto.service', 'priority': 4000, 'groups': ['matrix', 'matrixto']}] if matrix_matrixto_enabled else [])
|
([{'name': 'matrix-matrixto.service', 'priority': 4000, 'groups': ['matrix', 'matrixto']}] if matrix_matrixto_enabled else [])
|
||||||
+
|
+
|
||||||
|
|||||||
3
justfile
3
justfile
@@ -50,8 +50,7 @@ install-all *extra_args: (run-tags "install-all,ensure-matrix-users-created,star
|
|||||||
install-service service *extra_args:
|
install-service service *extra_args:
|
||||||
{{ just_executable() }} --justfile "{{ justfile() }}" run \
|
{{ just_executable() }} --justfile "{{ justfile() }}" run \
|
||||||
--tags=install-{{ service }},start-group \
|
--tags=install-{{ service }},start-group \
|
||||||
--extra-vars=group={{ service }} \
|
--extra-vars=group={{ service }} {{ extra_args }}
|
||||||
--extra-vars=devture_systemd_service_manager_service_restart_mode=one-by-one {{ extra_args }}
|
|
||||||
|
|
||||||
# Runs the playbook with --tags=setup-all,ensure-matrix-users-created,start and optional arguments
|
# Runs the playbook with --tags=setup-all,ensure-matrix-users-created,start and optional arguments
|
||||||
setup-all *extra_args: (run-tags "setup-all,ensure-matrix-users-created,start" extra_args)
|
setup-all *extra_args: (run-tags "setup-all,ensure-matrix-users-created,start" extra_args)
|
||||||
|
|||||||
Reference in New Issue
Block a user