image repos: herausfinden, was die Registry wirklich anbietet
"Login Succeeded" und trotzdem "unable to copy from source": der
Repository-Pfad enterprise/check-mk-enterprise war geraten, nicht
belegt. Statt weiter zu raten fragt das Werkzeug jetzt nach.
image repos [--edition E] [--registry R] [--user/--password]
fragt zuerst /v2/_catalog ab (sperren viele Registries) und probiert
danach die ueblichen Pfade durch, je Edition und deren Aliasnamen:
<ed>/check-mk-<ed>, check-mk-<ed>, checkmk/check-mk-<ed>,
enterprise/check-mk-<ed>
Gemeldet wird pro Pfad der HTTP-Status samt Tag-Anzahl. Scheitert ein
"image pull" gegen eine private Registry, laeuft die Pruefung von
selbst an und zeigt gleich, was dort liegt.
Wichtig bei der Deutung und deshalb auch so beschriftet: 401 heisst
nicht "vorhanden". Docker Hub antwortet auch auf nicht existierende
Repositories mit 401. Verlaesslich sind nur 200 und 404.
Nebenbei am Versionsarchiv geklaert, dass die Editionsumbenennung erst
mit 2.5 greift:
2.4.0p9 -> check-mk-{raw,enterprise,cloud,managed}-docker-...
2.5.0p13 -> check-mk-{community,pro,ultimate,ultimatemt}-docker-...
Fuer 2.4 ist "--edition enterprise" also richtig.
registry_get_token nimmt jetzt einen frei waehlbaren Scope, damit auch
registry:catalog:* angefordert werden kann.
Gegen Docker Hub verifiziert: findet checkmk/check-mk-raw (2394 Tags)
und checkmk/check-mk-community (534 Tags); gegen registry.checkmk.com
ohne Zugangsdaten sauberer Fehlbericht statt Haenger.
Dokumentiert als Abschnitt 8.8 in beiden Sprachfassungen.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+40
-1
@@ -947,7 +947,45 @@ the edition or version is changed:
|
||||
the image contains …".) Images loaded from a tarball (`localhost/…`) count as
|
||||
consistent as long as name and tag match.
|
||||
|
||||
### 8.8 Checking what is in effect
|
||||
### 8.8 Finding the registry path
|
||||
|
||||
"Login Succeeded" does not yet mean the path is right. If the pull reports
|
||||
`unable to copy from source docker://…`, the repository does not exist under
|
||||
that name, or the subscription does not cover it:
|
||||
|
||||
```bash
|
||||
./scripts/cmk-manage.sh image repos --edition enterprise
|
||||
```
|
||||
|
||||
This first queries the catalog (`/v2/_catalog`) – which many registries block –
|
||||
and then probes the usual paths:
|
||||
|
||||
```
|
||||
Uebliche Pfade fuer "raw" durchprobiert
|
||||
STATUS TAGS PFAD
|
||||
200 = nutzbar, 404 = gibt es nicht, 401/403 = kein Zugriff
|
||||
401 - raw/check-mk-raw (kein Zugriff - oder gibt es nicht)
|
||||
200 2394 checkmk/check-mk-raw
|
||||
...
|
||||
[ OK ] Nutzbar: docker.io/checkmk/check-mk-raw
|
||||
```
|
||||
|
||||
If an `image pull` against a private registry fails, this probe runs
|
||||
automatically and shows what is actually there.
|
||||
|
||||
> **401 does not necessarily mean "it exists".** Many registries – Docker Hub
|
||||
> among them – answer 401 for non-existent repositories too, so as not to
|
||||
> reveal whether they exist. Only **200 = usable** and **404 = does not exist**
|
||||
> are reliable.
|
||||
|
||||
If no path works, the tarball route remains. For Enterprise it is the
|
||||
documented one anyway, and it works independently of the registry:
|
||||
|
||||
```bash
|
||||
./scripts/cmk-manage.sh image download --edition enterprise --version 2.4.0p9
|
||||
```
|
||||
|
||||
### 8.9 Checking what is in effect
|
||||
|
||||
```bash
|
||||
./scripts/cmk-manage.sh image status # configured image + local images
|
||||
@@ -2009,6 +2047,7 @@ release notes beforehand.
|
||||
| Containers do not run after a reboot (Podman) | systemd unit missing: `./install.sh --with-systemd` or `--quadlet`, then `systemctl is-enabled checkmk-stack` |
|
||||
| `omd restore`: *version is not installed* | fetch the matching image: `cmk-manage.sh image pull --edition <ed> --version <v>`, then `up` |
|
||||
| Import aborts with an edition warning | an Enterprise backup needs an Enterprise image, see [chapter 8](#8-obtaining-the-checkmk-image-raw-enterprise--co) |
|
||||
| `Login Succeeded` but the pull fails with `unable to copy from source` | The repository path or the tag is wrong. `cmk-manage.sh image repos --edition enterprise` shows what the registry offers; otherwise use the tarball |
|
||||
| `image not known` / Podman searches `registry.access.redhat.com` | short image name. Set `CMK_IMAGE` fully qualified: `cmk-manage.sh image use docker.io/…` or `registry.checkmk.com/enterprise/…` |
|
||||
| `checkmk/check-mk-enterprise` not found on Docker Hub | correct – Enterprise is only on `registry.checkmk.com` or available as a tarball; from 2.5 the edition is called `pro` and is public on Docker Hub |
|
||||
| Tarball installed with `podman import`, image "unknown" | `import` produces an image without metadata. Remove the broken image with `podman rmi <id>` and use `cmk-manage.sh image load --file …` (which uses `load`) |
|
||||
|
||||
Reference in New Issue
Block a user