[App Management] Update check inspects a container named after the main service, so apps whose service is 'app' are never checked

Aperta
#592 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, docker-compose
Ambito
backend, devops

Direzione di ricerca

Inizia da service.(*AppStoreManagement).IsUpdateAvailableWith intorno alla riga 806 e segui come App Management risolve i container, confrontando quel percorso con il resto di App Management. Riproduci il problema con un’app il cui servizio si chiama app, includendo big-bear-ntfy o big-bear-portainer-agent; il lavoro è completato quando i controlli degli aggiornamenti raggiungono il confronto della versione o del digest invece di fallire con No such container: app.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Environment

  • ZimaOS v1.7.1 (ZimaCube), Docker 27.5.1
  • zimaos-app-management binary build: 2026-08-21
  • App Management log: /var/log/casaos/mod-management.log

Symptom

Some installed apps can never be checked for updates. IsUpdateAvailableWith fails while inspecting the app's container, before any version or digest comparison happens:

2026-09-11T06:42:38.348-0400  error  failed to inspect container
  {"func":"service.(*AppStoreManagement).IsUpdateAvailableWith","line":806,
   "error":"Error response from daemon: No such container: app"}
2026-09-11T06:42:38.348-0400  error  failed to check if update is available
  {"func":"service.(*AppStoreManagement).IsUpdateAvailable","line":713,
   "error":"Error response from daemon: No such container: app"}

The error text is identical every time — 674 occurrences in the log, and it is the only error reaching IsUpdateAvailable. The name being looked up is app; no container with that name exists on the host.

Root cause

The check resolves the app's container by its main service name. Both affected apps are single-service templates whose service is named app, and in neither case is the actual container called app:

app x-casaos main service declared container_name actual container
big-bear-ntfy app (none declared) big-bear-ntfy-app-1
big-bear-portainer-agent app portainer-agent portainer-agent

big-bear-portainer-agent is the informative case: it does declare container_name: portainer-agent, and the check still looks for app, so container_name is not being consulted. big-bear-ntfy has no container_name, so Compose names the container <project>-<service>-1, which also is not app.

Every other installed app on this host happens to have container_name equal to its service name (n8n, homeassistant, prowlarr, audiobookshelf, ttydbridge, ddns-go, filebrowser, big-bear-wallos), which is why they are checked normally and these two are not.

Impact

Both affected apps are being reported as up to date while actually being out of date:

binwiederhier/ntfy:latest        local digest f8a9b104...   registry digest 6ef4b819...
portainer/agent:latest           local digest 236246fc...   registry digest d63bfe57...

Reproduction

# no container named 'app' exists, although two installed apps have a service by that name
docker ps --format '{{.Names}}' | grep -x app          # -> no match
docker ps --format '{{.Names}}'                        # -> big-bear-ntfy-app-1, portainer-agent, ...

# the check uses that name anyway
grep -F 'No such container: app' /var/log/casaos/mod-management.log | tail

Suggested fix

Resolve the container the same way the rest of App Management does — respect the compose container_name when present, otherwise the Compose-generated <project>-<service>-1 — or inspect the app's image directly instead of going through a container lookup, or fall back to the image form when the container name does not resolve.

Related

Companion report: #591 (https://github.com/IceWhaleTech/ZimaOS/issues/591) — different root cause in the same function, filed separately. That one fails one step later, after the container lookup succeeds. Happy to have them consolidated if you prefer a single issue.

Lingua principale
Shell
Stelle
3.1k
Fork
130
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IceWhaleTech/ZimaOS

Tutte le issue di IceWhaleTech/ZimaOS

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.