Bug 1833008
Summary: | Should set the `--format docker` for podman when building image if want to use `oc adm catalog mirror` | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Filip Brychta <fbrychta> | ||||||
Component: | Documentation | Assignee: | Samantha Gidlow <sagidlow> | ||||||
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | Jian Zhang <jiazha> | ||||||
Severity: | high | Docs Contact: | Vikram Goyal <vigoyal> | ||||||
Priority: | high | ||||||||
Version: | 4.4 | CC: | aos-bugs, bluddy, dsover, ecordell, jiazha, jokerman, kalexand | ||||||
Target Milestone: | --- | ||||||||
Target Release: | 4.5.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1840370 (view as bug list) | Environment: | |||||||
Last Closed: | 2021-03-03 18:40:15 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Filip Brychta
2020-05-07 16:15:29 UTC
Created attachment 1686235 [details]
manifests directory
The attached Dockerfile is referencing latest, it should be referencing the target version of ocp (4.4 in this case). Do you see the same problem if you build with the 4.4 tag? (In reply to Evan Cordell from comment #3) > The attached Dockerfile is referencing latest, it should be referencing the > target version of ocp (4.4 in this case). Do you see the same problem if you > build with the 4.4 tag? Yes, I tried also with: registry.redhat.io/openshift4/ose-operator-registry:v4.4 quay.io/operator-framework/upstream-registry-builder both with the same error. It would be very helpful if anybody could try to reproduce and provide some workaround. The issue is visible only when using podman. I tried to build and push (steps 6 and 7) via docker and then the 'oc adm catalog mirror ...' (step 8) works fine. Tested podman 1.9.1 and 1.6.4 Docker version 19.03.8, build afacb8b Hi Filip, I was able to reproduce the issue you're experiencing. A few behaviors seem to be involved: - by default, "podman build" produces OCI images - oc's requests to the registry manifests endpoint don't indicate that it can handle the OCI manifest media type via the Accept header - quay.io will convert manifests on-the-fly to a media type understood by the client (https://github.com/quay/quay/blob/312717c7891b56ce5433dd573d06d3f579bce944/endpoints/v2/manifest.py#L126-L129) - the docker registry implementation will only convert manifests from docker v2->v1 -- if it's an OCI manifest, and the request doesn't accept OCI manifests, an error is returned (https://github.com/docker/distribution/blob/244d5246c2f193d50b2f8fd220784958a5e1318b/registry/handlers/manifests.go#L168-L171) The error being surfaced as "image not found" looks like this on the wire: { "errors": [ { "code": "MANIFEST_UNKNOWN", "message": "OCI manifest found, but accept header does not support OCI manifests" } ] } To work around this with podman, try repeating the process with the invocation of "podman build ..." changed to to "podman build --format docker ...". There are at least two open questions: 1) Is there a reason oc can't or shouldn't support OCI image manifests? 2) Should the referenced documentation include instructions for deploying Quay in addition to or instead of the Docker registry? Using "podman build --format docker ..." works fine. Thank you very much for providing the workaround. We should document that, when using podman directly, --format docker is required in order for `oc` commands to work. Closing this ticket as there is not sufficient data on which documentation pages are impacted by this bug. Please reopen the bug with specific documentation pages that are impacted by this bug. |