1, Install the `oc` that contains the fixed PR, as follows: [root@preserve-olm-env 4.6]# ./oc version -o yaml clientVersion: buildDate: "2021-01-30T16:34:42Z" compiler: gc gitCommit: 18d7461aca47e77cefb355339252a8d4c149188f gitTreeState: clean gitVersion: 4.6.0-202101301510.p0-18d7461 goVersion: go1.15.5 major: "" minor: "" platform: linux/amd64 releaseClientVersion: 4.6.0-0.nightly-2021-01-30-211400 ... 2, Run `oc adm catalog mirror` command to mirror the images to the registry directly. [root@preserve-olm-env 4.6]# ./oc adm catalog mirror quay.io/openshift-qe-optional-operators/ocp4-index:latest localhost:5000 --manifests-only src image has index label for database path: /database/index.db using database path mapping: /database/index.db:/tmp/145875005 wrote database to /tmp/145875005 using database at: /tmp/145875005/index.db no digest mapping available for registry.access.redhat.com/amq7/amq-streams-cluster-operator:1.1.0, skip writing to ImageContentSourcePolicy no digest mapping available for registry.access.redhat.com/amqstreams-1/amqstreams10-clusteroperator-openshift:1.0.0, skip writing to ImageContentSourcePolicy no digest mapping available for registry.redhat.io/amq7/amq-streams-operator:1.3.0, skip writing to ImageContentSourcePolicy no digest mapping available for quay.io/openshift-qe-optional-operators/ocp4-index:latest, skip writing to ImageContentSourcePolicy no digest mapping available for registry.redhat.io/amq7/amq-streams-operator:1.2.0, skip writing to ImageContentSourcePolicy wrote mirroring manifests to manifests-ocp4-index-1612142459 [root@preserve-olm-env 4.6]# tree manifests-ocp4-index-1612142459/ manifests-ocp4-index-1612142459/ ├── catalogSource.yaml ├── imageContentSourcePolicy.yaml └── mapping.txt 0 directories, 3 files [root@preserve-olm-env 4.6]# cat manifests-ocp4-index-1612142459/catalogSource.yaml apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ocp4-index namespace: openshift-marketplace spec: image: localhost:5000/openshift-qe-optional-operators/ocp4-index:latest sourceType: grpc [root@preserve-olm-env 4.6]# cat manifests-ocp4-index-1612142459/imageContentSourcePolicy.yaml apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: ocp4-index spec: repositoryDigestMirrors: - mirrors: - localhost:5000/openshift4/ose-elasticsearch-operator source: registry.redhat.io/openshift4/ose-elasticsearch-operator ... There is no panic, and the destination registry/repo looks good. 3, mirror the images to the same repo of the registry, it works well too. [root@preserve-olm-env 4.6]# ./oc adm catalog mirror quay.io/openshift-qe-optional-operators/ocp4-index:latest localhost:5000/test --manifests-only src image has index label for database path: /database/index.db using database path mapping: /database/index.db:/tmp/857592508 wrote database to /tmp/857592508 using database at: /tmp/857592508/index.db no digest mapping available for registry.access.redhat.com/amq7/amq-streams-cluster-operator:1.1.0, skip writing to ImageContentSourcePolicy no digest mapping available for quay.io/openshift-qe-optional-operators/ocp4-index:latest, skip writing to ImageContentSourcePolicy no digest mapping available for registry.access.redhat.com/amqstreams-1/amqstreams10-clusteroperator-openshift:1.0.0, skip writing to ImageContentSourcePolicy no digest mapping available for registry.redhat.io/amq7/amq-streams-operator:1.2.0, skip writing to ImageContentSourcePolicy no digest mapping available for registry.redhat.io/amq7/amq-streams-operator:1.3.0, skip writing to ImageContentSourcePolicy wrote mirroring manifests to manifests-ocp4-index-1612142634 [root@preserve-olm-env 4.6]# cat manifests-ocp4-index-1612142634/catalogSource.yaml apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ocp4-index namespace: openshift-marketplace spec: image: localhost:5000/test/openshift-qe-optional-operators-ocp4-index:latest sourceType: grpc [root@preserve-olm-env 4.6]# cat manifests-ocp4-index-1612142634/imageContentSourcePolicy.yaml apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: ocp4-index spec: repositoryDigestMirrors: - mirrors: - localhost:5000/test/openshift4-ose-clusterresourceoverride-rhel8-operator source: registry.redhat.io/openshift4/ose-clusterresourceoverride-rhel8-operator - mirrors: - localhost:5000/test/openshift4-ose-logging-elasticsearch6 source: registry.redhat.io/openshift4/ose-logging-elasticsearch6 ... Looks good, 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 (Important: OpenShift Container Platform 4.6.16 security and bug fix update), 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/RHSA-2021:0308