Bug 1840370
Summary: | Catalog images built by opm should be dockerv2 images | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Ben Luddy <bluddy> |
Component: | OLM | Assignee: | Ben Luddy <bluddy> |
OLM sub component: | OLM | QA Contact: | Jian Zhang <jiazha> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | medium | CC: | aos-bugs, bluddy, dsover, ecordell, fbrychta, jokerman, vigoyal, xtian |
Version: | 4.4 | ||
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: | 1833008 | Environment: | |
Last Closed: | 2020-07-13 17:41:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Comment 3
Jian Zhang
2020-05-28 09:32:09 UTC
Sorry, it was unclear what was changed due to the amount of context in the original report. This is a change to the outputs produced by "opm index add" when the "--container-tool" option is set to "podman". With the change, the media type of the index image's manifest is "application/vnd.docker.distribution.manifest.v2+json": $ opm index add --container-tool podman --bundles '' -t xyz INFO[0000] building the index bundles="[]" INFO[0000] Generating dockerfile bundles="[]" INFO[0000] writing dockerfile: index.Dockerfile432739094 bundles="[]" INFO[0000] running podman build bundles="[]" INFO[0000] [podman build --format docker -f index.Dockerfile432739094 -t xyz .] bundles="[]" $ podman image inspect -f '{{.ManifestType}}' xyz application/vnd.docker.distribution.manifest.v2+json And before the change, it is "application/vnd.oci.image.manifest.v1+json": $ opm index add --container-tool podman --bundles '' -t abc INFO[0000] building the index bundles="[]" INFO[0000] Generating dockerfile bundles="[]" INFO[0000] writing dockerfile: index.Dockerfile896731071 bundles="[]" INFO[0000] running podman build bundles="[]" INFO[0000] [podman build -f index.Dockerfile896731071 -t abc .] bundles="[]" $ podman image inspect -f '{{.ManifestType}}' abc application/vnd.oci.image.manifest.v1+json If you look at the output of opm index add after the change, you'll notice that it is passing "--format docker" to the underlying podman build command. Hi Ben, Thanks for your explanation! I see now. Yes, I can see the manifest.v1+json before this change, as follows: [root@preserve-olm-env opm]# ./opm index add --container-tool podman -b quay.io/olmqe/etcd-bundle:0.9.0 -t quay.io/olmqe/etcd-index:test INFO[0000] building the index bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0000] running /usr/bin/podman pull quay.io/olmqe/etcd-bundle:0.9.0 bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0001] running /usr/bin/podman pull quay.io/olmqe/etcd-bundle:0.9.0 bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" ... INFO[0012] [podman build -f index.Dockerfile831554325 -t quay.io/olmqe/etcd-index:test .] bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" [root@preserve-olm-env opm]# podman image inspect -f '{{.ManifestType}}' quay.io/olmqe/etcd-index:test application/vnd.oci.image.manifest.v1+json After this change, we can see the version changed to `manifest.v2+json`, and `--format docker` added in "podman build" process. [root@preserve-olm-env operator-registry]# git log commit 054cd90a84ecadc24d6b94e955c3437ac740a1a7 Merge: 7437af6 2c009be Author: OpenShift Merge Robot <openshift-merge-robot.github.com> Date: Thu May 28 14:36:19 2020 -0400 Merge pull request #340 from ecordell/ro Bug 1840727: fix(unpack): support unpacking readonly folders .. [root@preserve-olm-env operator-registry]# make build ... [root@preserve-olm-env operator-registry]# ./bin/opm index add --container-tool podman -b quay.io/olmqe/etcd-bundle:0.9.0 -t quay.io/olmqe/etcd-index:test3 INFO[0000] building the index bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0000] running /usr/bin/podman pull quay.io/olmqe/etcd-bundle:0.9.0 bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0010] running /usr/bin/podman pull quay.io/olmqe/etcd-bundle:0.9.0 bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0011] running podman save bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0011] Could not find optional dependencies file dir=bundle_tmp894188428 file=bundle_tmp894188428/metadata load=annotations INFO[0011] found csv, loading bundle dir=bundle_tmp894188428 file=bundle_tmp894188428/manifests load=bundle INFO[0011] loading bundle file dir=bundle_tmp894188428/manifests file=etcdbackups.etcd.database.coreos.com.crd.yaml load=bundle INFO[0011] loading bundle file dir=bundle_tmp894188428/manifests file=etcdclusters.etcd.database.coreos.com.crd.yaml load=bundle INFO[0011] loading bundle file dir=bundle_tmp894188428/manifests file=etcdoperator.v0.9.0.clusterserviceversion.yaml load=bundle INFO[0011] loading bundle file dir=bundle_tmp894188428/manifests file=etcdrestores.etcd.database.coreos.com.crd.yaml load=bundle INFO[0011] Generating dockerfile bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0011] writing dockerfile: index.Dockerfile067690954 bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0011] running podman build bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" INFO[0011] [podman build --format docker -f index.Dockerfile067690954 -t quay.io/olmqe/etcd-index:test3 .] bundles="[quay.io/olmqe/etcd-bundle:0.9.0]" [root@preserve-olm-env operator-registry]# podman image inspect -f '{{.ManifestType}}' quay.io/olmqe/etcd-index:test3 application/vnd.docker.distribution.manifest.v2+json LGTM, verify it. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2409 |