Rolle ai_backup: woechentlicher Timer, NFS-Ziel (Encoding-Pipeline- Anbindung, Betreiberentscheid), Archiv ohne GGUF-Weights (SOURCE.yml- Reproduzierbarkeit), SHA256-Sidecar, Retention 8; Restore-Nachweise R1 (Baum-Diff) und R2 (environment-state restore) bestanden. Echter Hostreboot: Recovery-Service bringt Production selbststaendig hoch. Verfuegbarkeitsmetrik gn_ai_active_env (Textfile, 30 s) mit Regel- vorschlag fuer die GNMON-Suite. M4 damit vollstaendig abgenommen. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
ai_environment_switch
Exclusive switch between the AI environments (GNAI-008 section 7.3, GNAI-001 milestone 4). Deploys:
gnai-environment-switch(privileged host script): flock-locked transitions with stop-before-start, GPU release proof (/dev/kfd, render nodes per environment UID), health wait and atomic state file (/var/lib/ghostnet-ai/environment-state)./etc/ghostnet-ai/environment-switch.conf: the environment mapping (accounts, UIDs, unit prefixes, active units) fromdefaults/main.yml.gnai-environment-recovery.service+.timer: idempotent reconciliation — after host boots it brings the state-active environment back up; every minute it returns to the fallback (production) once a maintenance window has expired. This covers runner aborts and lost CI without production secrets in any CI path.
Subcommands of the script: status, switch-to <env> [window-minutes]
and recover. Non-fallback switches require a maintenance window and
are validated; the window end is recorded in the state file.
The switch itself is executed via playbooks/switch-environment.yml
(-e ai_environment_target=… [-e ai_environment_window_minutes=…]).
Unit names and accounts must stay in sync with the per-environment
inference_engine group_vars.