Open TadCordle opened 4 years ago
@vrothberg Does this fall under the same category as multiple images in the same tar with the Docker format? It's just tags, but it does seem to be multiple manifests
@vrothberg Does this fall under the same category as multiple images in the same tar with the Docker format? It's just tags, but it does seem to be multiple manifests
error loading index: more than one image in oci, choose an image
We're correctly detecting the index but we didn't specify which image(s) to select. @nalind is the expert of manifest lists and indexes, so I'll assign it to him.
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days.
For docker-archive:
sources, I think we should be able to get the list of images using the source's LoadTarManifest()
method and then iterate over them. (It wouldn't be fast, and it would require some logic outside of the image library.) If I'm reading it right, we'd need to add something similar for oci-archive:
's LoadManifestDescriptor()
to avoid an ErrMoreThanOneImage
error, but then we could do the same for it.
@TadCordle Any chance you could work on this. We don't have anyone with the time to work on it right now.
@QiWang19 PTAL
@QiWang19 @vrothberg Do we still have this issues, with some of the fixes for load that have been happening?
Still an issue
Still an issue, that I look forward to fixing? :^)
Note that multi-image support is limited to docker-archive. oci-archive may be an entirely different beast. I've not looked into though.
I guess that's something we should discuss and size during planing with @mtrmac
Purely structurally, the OCI archive and docker-archive are pretty similar, so it’t very tempting to use a a docker-archive-like multi-reader/writer .
The way OCI can use an index to represent a multi-archive image (or IIRC something else, to an arbitrary depth of nesting in theory), and the way c/image actually implements multi-archive in OCI in practice, may interact/conflict with that, though, and I’m afraid I have never read the OCI multi-arch implementation (by @nalind) in full, so I’m not immediately sure about the impact.
I also suspect that the current OCI code could do something unexpected if there are two entries pointing at the same manifest; this was IIRC never a core concern during implementation/reviews in that core area, so it may well behave in surprising ways.
Note that this issue has a much narrower scope than the multi-architecture support with multiple images. The feature is merely to give multiple tags to a single image.
And if you follow the issue on the OCI image spec repo, they do suggest to have multiple entries pointing to the same manifest to assign multiple tags.
It’s not really narrower: right now the top level blindly assumes that the archive contains a single image (or that the user has specified a single image out of the archive). We need to build an infrastructure to list all images and handle them appropriately, and the “list all images” part necessarily includes “detect multi-arch images and treat them appropriately”.
A friendly reminder that this issue had no activity for 30 days.
@QiWang19 @mtrmac Any movement on this?
@rhatdan See the PRs by @QiWang19 linked just above.
Well any movement on these PRs?
They are still under review and working in progress PRs.
@mtrmac Could you update the state on this one and the PRs?
A friendly reminder that this issue had no activity for 30 days.
Unassigned, @QiWang19 who's currently busy in CRI-O land. I also marked it as a feature since OCI archives are not documented to support multi images.
A friendly reminder that this issue had no activity for 30 days.
@umohnani8 is currently working on it
A friendly reminder that this issue had no activity for 30 days.
A friendly reminder that this issue had no activity for 30 days.
@umohnani8 Ping.
A friendly reminder that this issue had no activity for 30 days.
@umohnani8 Progress?
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I want to be able to tag an oci archive multiple times (similar to the results of
podman tag
, but automatically for oci tars that are loaded into podman). To do this I duplicate the manifest descriptor inindex.json
and give it a different image ref name, but when I try to load the new oci archive into podman, I get an error.Steps to reproduce the issue:
Run:
Duplicate the manifest descriptor in
distroless-oci/index.json
and modify theorg.opencontainers.image.ref.name
, so the contents are as follows:Run:
tar -czf new-distroless.tar distroless-oci/
Run either
podman load < new-distroless.tar
orpodman pull oci-archive:new-distroless.tar
Describe the results you received:
Using
podman load < new-distroless.tar
:Using
podman pull oci-archive:new-distroless.tar
:Describe the results you expected:
podman images
loads the oci archive successfully, and lists bothgcr.io/distroless/java:latest
andgcr.io/distroless/java:tag2
.Additional information you deem important (e.g. issue happens only occasionally):
I'm essentially trying to replicate what the
RepoTags
field in a docker tar manifest does when youdocker load
the tar. (https://github.com/opencontainers/image-spec/issues/796)Output of
podman version
:Output of
podman info --debug
: