]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: normalize unqualified repo digests to docker.io 40577/head
authorSage Weil <sage@newdream.net>
Sat, 3 Apr 2021 13:14:00 +0000 (09:14 -0400)
committerSage Weil <sage@newdream.net>
Fri, 9 Apr 2021 20:53:37 +0000 (16:53 -0400)
commite07a73830436340e77180782216524f071a5a292
treeca81dfc57419f6c093539a624af393c6ab05b063
parent38f84520eefaba14d4f4ae5572ea948819a3fd7d
cephadm: normalize unqualified repo digests to docker.io

A RepoDigests returned by docker|podman image inspect can either include
the docker.io/ prefix or not.  For reasons that aren't entirely clear,
this may vary between hosts in a cluster.  However, ceph/ceph@sha256:abc...
is the same thing as docker.io/ceph/ceph@sha256:abc..., and should be
treated as such.  Otherwise, upgrade can get into a loop where it pulls
the image on a new host, finds the other variant of the repodigests,
sees no overlap, updates target_digests, and restarts.  (It will then
find the first variant again on the first host and loop.)

Avoid this by normalizing any docker.io digests by always including the
docker.io/ prefix.

Note that it is technically possible that this assumption is wrong: it
may be that the image that already exists on the local host is from a
different registry in registries.conf's unqualified-search-registries.
However, we don't know which, since this is a search list.  In practice,
it should be exceeding rare that an image that *we* are installing using
a fully-qualified image name will end up having an unqualified repodigest
in the local registry.  Hopefully!

Fixes: https://tracker.ceph.com/issues/50114
Signed-off-by: Sage Weil <sage@newdream.net>
src/cephadm/cephadm