Files
ironic/releasenotes/notes/oci-fixes-bbbcc633394252f6.yaml
Dmitry Tantsur 4b8a3733f6 Fix OCI artifacts pointing to a single manifest
When using ORAS to upload a file to Quay, the tag points directly to
the manifest, not to the index of manifests. Currently, Ironic is not
capable of handling the former.

First, GET API to a manifest does not accept
application/vnd.oci.image.index.v1+json, only
application/vnd.oci.image.manifest.v1+json, so indicate that we
understand both.

Second, the logic in the OCI image service needs to be adjusted to this
case. If the index is a manifest, it is now treated the same as an index
with only that manifest.

Third, the manifest's body does not contain its own digest. Instead, it
can be fetched from the docker-content-digest header, so get it and
store as a virtual field dockerContentDigest.

As part of the change, I had to refactor identify_specific_image since
it exceeded the allowed complexity with my changes.

Also fix get_blob_url to work with image URLs without oci://. This is
not possible to trigger through the API but ensures internal
consistency.

Also provide more specific error messages instead of piling everything
under the very generic ImageNotFound and provide more logging.

Change-Id: Iba84bbe5da541700d20a445818a4a0d584f1eca8
Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
2025-09-20 14:34:37 +02:00

6 lines
140 B
YAML

---
fixes:
- |
Fixes deploying OCI artifacts uploaded by ORAS to Quay.io (and potentially
other registries) as a single manifest.