Bug 1902299
| Summary: | Failed to mirror operator catalog - error: destination registry required | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Yurii Prokulevych <yprokule> |
| Component: | OLM | Assignee: | Kevin Rizza <krizza> |
| OLM sub component: | OLM | QA Contact: | Jian Zhang <jiazha> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | high | CC: | afield, agurenko, anli, aos-bugs, bjacot, ccrum, dageoffr, jokerman, krizza, kuiwang, mcornea, mfojtik, sasha, ykashtan |
| Version: | 4.7 | Keywords: | AutomationBlocker, TestBlocker, Triaged |
| Target Milestone: | --- | ||
| Target Release: | 4.7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-02-24 15:36:28 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1917549 | ||
|
Description
Yurii Prokulevych
2020-11-27 16:18:20 UTC
*** Bug 1911226 has been marked as a duplicate of this bug. *** 1, Install the `oc` that contains the fixed PR, as follows:
[root@preserve-olm-env data]# oc version
Client Version: 4.7.0-0.nightly-2021-01-17-211555
Server Version: 4.7.0-0.nightly-2021-01-18-000316
Kubernetes Version: v1.20.0+d9c52cc
[root@preserve-olm-env data]# oc version -o yaml
clientVersion:
buildDate: "2021-01-16T22:37:00Z"
compiler: gc
gitCommit: 4d52be6017616fe8836a51b820777df2f71d179f
gitTreeState: clean
gitVersion: 4.7.0-202101162121.p0-4d52be6
goVersion: go1.15.5
major: ""
minor: ""
platform: linux/amd64
openshiftVersion: 4.7.0-0.nightly-2021-01-18-000316
releaseClientVersion: 4.7.0-0.nightly-2021-01-17-211555
serverVersion:
buildDate: "2021-01-16T04:43:08Z"
compiler: gc
gitCommit: d9c52cc4e02894215b0d1c2aeea240fe77765c66
gitTreeState: clean
gitVersion: v1.20.0+d9c52cc
goVersion: go1.15.5
major: "1"
minor: "20"
platform: linux/amd64
2, Run `oc adm catalog mirror` command to mirror the images to the registry directly.
[root@preserve-olm-env data]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0bb9ddaa46a3 registry "/entrypoint.sh /etc…" 4 seconds ago Up 3 seconds 0.0.0.0:5000->5000/tcp registry
[root@preserve-olm-env data]# 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/270628314
wrote database to /tmp/270628314
using database at: /tmp/270628314/index.db
no digest mapping available for registry.redhat.io/amq7/amq-streams-operator:1.3.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.2.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/amq7/amq-streams-cluster-operator:1.1.0, skip writing to ImageContentSourcePolicy
wrote mirroring manifests to manifests-ocp4-index-1610956627
[root@preserve-olm-env data]# tree manifests-ocp4-index-1610956627/
manifests-ocp4-index-1610956627/
├── catalogSource.yaml
├── imageContentSourcePolicy.yaml
└── mapping.txt
0 directories, 3 files
[root@preserve-olm-env data]# cat manifests-ocp4-index-1610956627/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 data]# cat manifests-ocp4-index-1610956627/imageContentSourcePolicy.yaml
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: ocp4-index
spec:
repositoryDigestMirrors:
- mirrors:
- localhost:5000/openshift4/ose-cluster-nfd-operator
source: registry.redhat.io/openshift4/ose-cluster-nfd-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 data]# 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/870248352
wrote database to /tmp/870248352
using database at: /tmp/870248352/index.db
no digest mapping available for registry.redhat.io/amq7/amq-streams-operator:1.3.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.access.redhat.com/amqstreams-1/amqstreams10-clusteroperator-openshift:1.0.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/amq7/amq-streams-cluster-operator:1.1.0, skip writing to ImageContentSourcePolicy
wrote mirroring manifests to manifests-ocp4-index-1610956792
[root@preserve-olm-env data]# tree manifests-ocp4-index-1610956792
manifests-ocp4-index-1610956792
├── catalogSource.yaml
├── imageContentSourcePolicy.yaml
└── mapping.txt
0 directories, 3 files
[root@preserve-olm-env data]# cat manifests-ocp4-index-1610956792/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 data]# cat manifests-ocp4-index-1610956792/imageContentSourcePolicy.yaml
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: ocp4-index
spec:
repositoryDigestMirrors:
- mirrors:
- localhost:5000/test/openshift4-ose-sriov-cni
source: registry.redhat.io/openshift4/ose-sriov-cni
...
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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633 |