Files
computer-playbook/roles/svc-ai-lmstudio/vars/main.yml
kevinveenbirkenbachandClaude Opus 5 f10d281533 fix(lmstudio): read the models mount from the registry, not from memory
CI job 105881436871 on 0b7a8a95d:

    A container path declared in meta/volumes.yml is written out again.
    roles/svc-ai-lmstudio/tasks/utils/preload/node.yml:7: /root/.lmstudio/models
    (declared as 'lmstudio_models')

The disk guard typed the mount target instead of deriving it. That matters more
since the split: the role now carries two nested volumes, and which of them holds
models/ is decided solely by meta/volumes.yml. A second copy of the path drifts
the moment the mount moves, which is the drift 29015311b6 built this lint for.

LMSTUDIO_MODELS_TARGET resolves it through lookup('volume', …).target, next to
LMSTUDIO_SHARED_MODELS_PATH, which already reads .name from the same entry.

The test script held the same path a second time. The lint only reads yaml and
templates, so it would never have reported that copy, and it would have gone
stale just as quietly. It now receives the value through test.env.

Not caught locally, and the reason is worth recording: the preceding `make
quality` was red on three formalities of the new test assets. I fixed those,
re-ran only those three lints, and deployed. This finding sat a few lines below
them in the same output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 12:36:35 +02:00

23 lines
1.6 KiB
YAML

---
application_id: "svc-ai-lmstudio"
entity_name: "{{ application_id | get_entity_name }}"
LMSTUDIO_CONTAINER: "{{ lookup('config', application_id, 'services.lmstudio.name') }}"
LMSTUDIO_PORT: "{{ lookup('config', application_id, 'services.lmstudio.ports.internal.http') }}"
LMSTUDIO_PRELOAD_MODELS: "{{ lookup('config', application_id, 'services.lmstudio.preload_models') }}"
LMSTUDIO_PRELOAD_ASYNC_TIME: "{{ lookup('config', application_id, 'services.lmstudio.preload_async_time') }}"
LMSTUDIO_PRELOAD_FLOOR_SECONDS: "{{ lookup('config', application_id, 'services.lmstudio.preload_floor_seconds') }}"
LMSTUDIO_PRELOAD_MIN_BYTES_PER_SECOND: "{{ lookup('config', application_id, 'services.lmstudio.preload_min_bytes_per_second') }}"
LMSTUDIO_PRELOAD_LARGEST_BYTES: >-
{{ LMSTUDIO_PRELOAD_MODELS | map(attribute='bytes') | map('int') | max }}
LMSTUDIO_MODELS_TARGET: "{{ lookup('volume', application_id, 'lmstudio_models').target }}"
LMSTUDIO_NFS_SERVER: "{{ (groups['svc-storage-nfs-server'] | default([]))[0] | default(inventory_hostname) }}"
LMSTUDIO_SHARED_MODELS_PATH: "{{ [ STORAGE_NFS_STATE_PATH, lookup('volume', application_id, 'lmstudio_models').name ] | path_join }}"
LMSTUDIO_SHARED_STAGING_PATH: "{{ [ STORAGE_NFS_STATE_PATH, '.lmstudio-staging' ] | path_join }}"
LMSTUDIO_PRESEED_ENABLED: >-
{{ (DEPLOYMENT_MODE == 'swarm')
and (storage.backend == 'nfs')
and ((groups['svc-storage-nfs-server'] | default([])) | length > 0)
and (lookup('volume', application_id, 'lmstudio_models').nfs is not false)
and (application_id not in lookup('roles_with_placement', 'manager')) }}