Bug #10298

Updated by Tom Clegg over 3 years ago

Currently, if container_image is
* ...a docker hash, repo, or repo:tag, then we look up tag links and use the indicated collection
* ...a PDH, then we look in the indicated collection to see whether it has a single file called (sha256:)?{64-hex-digits}.tar. If so, we use that collection; if not, we try to look for tag links as if it were a docker repo:tag or hash (!).
* ...a UUID, then we look for tag links as if it were a docker repo:tag or hash.

It is possible to have a docker image with a name that _happens_ to look like a PDH or UUID. In such cases, the image selected by the current code depends not only on whether a real collection with the PDH-like string happens to exist, but also the _contents_ of that collection.

It would be more predictable to say
* If container_image looks like a collection UUID (".....-4zz18-..........")
** ...and that collection is readable,
then use that collection.
** ...otherwise, fail.
* If container_image looks like a PDH ("hexdigest+decsize")
** ...and that collection is readable,
then use that collection.
** ...otherwise, fail.

* Otherwise, treat it as a docker repo, repo:tag, or hash, and look up tags as usual.

Back