bug: Docker terminals ignore `TERMINALS_MAX_STORAGE`, `TERMINALS_MAX_CPU` and `TERMINALS_MAX_MEMORY` when template limits are blank
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
Direzione di ricerca
Read terminals/utils/template_specs.py for template default resolution, then trace the effective configuration into terminals/backends/docker.py; the report also points to validation in terminals/routers/templates.py. Check how blank and explicit CPU, memory, and storage values interact with the configured ceilings, then verify newly provisioned Docker containers stay within those caps, including templates saved before the caps were set.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
UPDATE: I missed TERMINALS_MAX_STORAGE in the initial report. While 0.4.3 fixed the other two, the storage one apparantly was not fixed.
Description
In Terminals v0.4.2 with the Docker backend, leaving CPU or Memory at “Server default” in Open WebUI can create an instance with no explicit Docker limit, even when the corresponding TERMINALS_MAX_* variable is set. The README describes these variables as hard caps on each terminal container. [Configuration reference](https://github.com/open-webui/terminals/blob/v0.4.2/README.md#common)
Steps to reproduce
-
Set the following in the Terminals orchestrator’s environment and recreate the orchestrator.
TERMINALS_MAX_CPU=2 TERMINALS_MAX_MEMORY=4Gi -
Create a new terminal template in Open WebUI. Leave CPU and Memory blank so both show “Server default.”
-
Open the terminal to provision a fresh instance, then inspect the spawned container.
docker inspect --format 'NanoCpus={{.HostConfig.NanoCpus}} Memory={{.HostConfig.Memory}}' <spawned-container>
Actual behavior
The provisioning code leaves both limits unset, which Docker reports as NanoCpus=0 Memory=0. If the template explicitly requests 4 CPUs and 8Gi of memory, the same environment variables clamp those values to 2 and 4Gi when the template is saved. [Template validation](https://github.com/open-webui/terminals/blob/v0.4.2/terminals/routers/templates.py#L109-L123) · [Docker provisioning](https://github.com/open-webui/terminals/blob/v0.4.2/terminals/backends/docker.py#L105-L125)
Expected behavior
Every newly provisioned instance should stay within the configured per-instance ceilings. A blank field can inherit the configured ceiling, an explicit value below it should be preserved, and a value above it should be clamped. With both fields blank in the example above, Docker should report NanoCpus=2000000000 Memory=4294967296.
Likely cause
Template validation only clamps fields that are present. The template resolver fills in the default image but leaves CPU and memory unset, and Docker provisioning only sets limits when those fields have values. Applying the ceilings when resolving the effective configuration would also cover templates saved before an administrator configured the caps. [Template default resolution](https://github.com/open-webui/terminals/blob/v0.4.2/terminals/utils/template_specs.py#L12-L21)
Verification: Traced against the v0.4.2 source. The Docker inspection above is a proposed runtime check.
- Lingua principale
- Python
- Stelle
- 139
- Fork
- 36
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di open-webui/terminals
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
open-webui/terminals#84 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
open-webui/terminals#51 · 3 commenti ·
Tutte le issue di open-webui/terminals
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
I maintainer di solito rispondono entro 1 giorno
-
DoRA magnitude vectors are not loaded by Transformers load_adapter / from_pretrained(adapter_dir)Apertapost-v1
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
huggingface/peft#4208 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
approved correction metadata
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
acl-org/acl-anthology#10996 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
gke-labs/kube-agents#6620 ·
I maintainer di solito rispondono entro 1 giorno