Phase 2 (systemd tag) notified per-service restart handlers and then called meta: flush_handlers itself, so any run where either unit's template content changed (including first apply) restarted BOTH live services immediately in Phase 2 -- before Phase 3 firewall scoping or Phase 4 smoke tests ran. This contradicted the phase's documented purpose (units land on disk only, nothing starts/restarts until Phase 4). Fix: Phase 2 only reloads the systemd daemon and registers each template task's changed result. Phase 4 (verify.yml) now decides start vs restart per-service based on that recorded change, so restarts remain independent per instance and never fire before Phase 4.
26 lines
1.3 KiB
YAML
26 lines
1.3 KiB
YAML
---
|
|
# ------------------------------------------------------------------------------
|
|
# FILE: roles/llm-inference-multimodel/handlers/main.yml
|
|
# DESCRIPTION: Only a daemon-reload handler lives here now (harmless, no
|
|
# process impact). Per-service restart/start decisions are made
|
|
# explicitly in tasks/verify.yml (Phase 4), keyed off the
|
|
# per-unit `changed` result registered in tasks/systemd.yml
|
|
# (Phase 2) — NEVER combined, so a content change to one unit
|
|
# template still never restarts the other (plan §2/§6
|
|
# requirement: independent restart/rollback).
|
|
#
|
|
# BUGFIX: this file used to also define "restart
|
|
# llama-server-aux" / "restart llama-server-toolcall" handlers,
|
|
# notified from Phase 2's template tasks and fired there via
|
|
# `meta: flush_handlers` — causing both live services to
|
|
# restart during Phase 2, before Phase 3/4 had run. See
|
|
# tasks/systemd.yml for the full writeup. Restart logic moved
|
|
# to tasks/verify.yml so it only ever fires in Phase 4.
|
|
# ------------------------------------------------------------------------------
|
|
|
|
- name: Reload systemd
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
become: true
|
|
listen: "reload systemd"
|