10.4-Tests bestanden: Idempotenz (changed=0), kontrollierter Neustart erhaelt Profil/Modell, bewusster Stopp bleibt Stopp, Profilwechsel in beide Richtungen ueber die Rolle fehlerfrei ohne erneuten Download. Befundkorrektur 5.3: direkter systemctl start der zweiten Unit fuehrt KEINEN geordneten Wechsel aus - beide Modelle laden in der UEbergangsphase parallel (beobachtet 01.11.2026). Conflicts= sichert nur den Endzustand; Before= aus den Quadlets entfernt. Der geordnete Stop-vor-Start-Wechsel ist ausschliesslich die Rollen-Umschaltoperation. Host-Reboot-Test an den Betreiber uebertragen. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
inference_engine
Deploys the inference engine for one KI environment as rootless Podman
Quadlets (GNAI-010 sections 5 and 6; first profile: llama.cpp). Runs after
model_store in the same play and reuses model_store_root.
Variables
inference_engine_image_ref– immutable image digest (ghcr.io/...@sha256:...).inference_engine_user/inference_engine_uid/inference_engine_user_home– workload account created by the hostworkload_accountsrole.inference_engine_unit_prefix– unit and container prefix of the environment (Testing:gnai-testing-llama).inference_engine_network_name/inference_engine_network_alias– internal-only Quadlet network (Internal=true), aliasllama-cppfor the later API policy layer.inference_engine_profiles– map of model profiles; each needsunit_suffix,model_directory,model_file,alias,ctx_size,n_predict,reasoning_effort, sampling values and anmtpblock.inference_engine_active_profile– the single profile to start.inference_engine_ctx_size_override– when notnull, replaces every profile'sctx_size(Testing bring-up: 65536; set tonullafter the 128k acceptance, GNAI-008 section 7.5).
Behaviour
- Validates declarations, requires
/dev/kfdplus exactly two render nodes, and requires every profile's model artifact (run--tags modelsfirst). - Pulls the pinned image by digest into the environment's rootless store only when missing.
- Renders
<network>.networkand one.containerper profile into/etc/containers/systemd/users/<uid>/; units are never enabled fordefault.target. - Units mutually exclude each other via
Conflicts=/Before=(GNAI-010 section 5.3). - Exercises the Quadlet generator with
--dryrunbefore any reload; quadlet changes notify adaemon-reloadof the workload user manager. Services are never restarted automatically. - Switch/start (only with the
servicetag, never in check mode): stop any other active engine unit, start the selected unit, wait for/health, and verify the served alias via/v1/models. The HTTP check uses whichever ofcurl/wgetexists in the pinned image (GNAI-010 section 8).
Tags
service– everything in this role. Model provisioning belongs to themodelstag of themodel_storerole.
Logs
conmon writes the container output to the system journal (journald driver) with the syslog identifier set to the container name. Read as root:
journalctl _COMM=conmon -t gnai-testing-llama-swift --no-pager
podman logs returns empty for the workload account (journal file
permissions); acceptance protocols are collected as root (GNAI-010 section
8.1).
Notes
- There is no
PublishPort=; the engine is reachable only inside the environment network. - The role does not start the engine in check mode and never downloads models.