"Nur eintragen" setzt jetzt auch CMK_IMAGE

Berechtigter Einwand: wer Edition und Version waehlt und "nichts holen"
sagt, will das Image SETZEN, nicht bloss zwei Vorgaben notieren. Mein
Entwurf trennte das kuenstlich - und hinterliess genau dadurch den
Zustand, den die Abweichungswarnung dann anmahnte. Das war die Ursache
des Hin und Her.

Die Referenz laesst sich aus Edition und Version bilden:
    enterprise 2.4.0p9 -> registry.checkmk.com/enterprise/check-mk-enterprise:2.4.0p9
    raw        2.4.0p9 -> docker.io/checkmk/check-mk-raw:2.4.0p9
Nur bei einem aus dem Tarball geladenen Image geht das nicht, da kommt
der Name aus dem Archiv.

Deshalb:
  image use --edition E --version V
bildet die Referenz und traegt CMK_IMAGE, CMK_EDITION und CMK_VERSION
ein, ohne irgendetwas herunterzuladen. Geholt wird beim naechsten "up"
durch die Runtime selbst.

Im Assistenten heisst der Weg jetzt "Nur eintragen - geholt wird beim
naechsten Start" und nutzt genau das. Damit setzen ALLE vier Wege
CMK_IMAGE; sie unterscheiden sich nur darin, ob dabei schon etwas
geholt wird. Die drei Werte bleiben dadurch von selbst stimmig, und die
Abweichungswarnung tritt im normalen Betrieb nicht mehr auf.

Geprueft: das Kommando und der Assistentenweg setzen alle drei Werte,
danach meldet "image status" keine Abweichung mehr.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-20 18:13:57 +02:00
co-authored by Claude Opus 5
parent c1371da7aa
commit 9d8a9ecf71
3 changed files with 99 additions and 32 deletions
+24 -6
View File
@@ -918,12 +918,30 @@ registry.checkmk.com/enterprise/check-mk-enterprise:2.3.0p9 (registry)
localhost/checkmk/check-mk-enterprise:2.3.0p9 (loaded from a tarball)
```
So `CMK_IMAGE` records what is **actually there**, and it is written by
`image pull`, `image download`, `image load` and `image use` – you normally
never have to type anything there by hand. In the interface the three values
are therefore not editable individually: the wizard sets them together so they
cannot drift apart. On the command line they remain individually settable
(`config set …`).
So `CMK_IMAGE` records what **actually applies**. It is written by
`image pull`, `image download`, `image load` and `image use` – you never have to
type anything there by hand. In the interface the three values are therefore not
editable individually: the wizard sets them together. On the command line they
remain individually settable (`config set …`).
**Recording it without downloading anything.** The reference can be built from
edition and version – no download required:
```bash
./scripts/cmk-manage.sh image use --edition enterprise --version 2.4.0p9
# -> CMK_IMAGE=registry.checkmk.com/enterprise/check-mk-enterprise:2.4.0p9
# CMK_EDITION=enterprise
# CMK_VERSION=2.4.0p9
```
The image itself is fetched by the runtime on the next `up`. In the wizard this
route is called **"Nur eintragen – geholt wird beim naechsten Start"**. If the
registry needs a login (Enterprise), that has to have happened once – either via
the "Registry holen" route or with `podman login registry.checkmk.com`.
> **All four wizard routes set `CMK_IMAGE`** – they only differ in whether
> something is fetched right away. The three values therefore stay consistent by
> themselves, and the mismatch warning no longer appears in normal operation.
On the command line, `image pull` and `image download` take `--remember` to
store the edition and version in `.env` as well: