Bug 1790798
Summary: | "oc adm catalog mirror" fails to parse the source image | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Jian Zhang <jiazha> | |
Component: | OLM | Assignee: | Evan Cordell <ecordell> | |
OLM sub component: | OLM | QA Contact: | Jian Zhang <jiazha> | |
Status: | CLOSED ERRATA | Docs Contact: | ||
Severity: | high | |||
Priority: | high | CC: | bandrade, ecordell, jmontleo, krizza, xjiang | |
Version: | 4.3.z | |||
Target Milestone: | --- | |||
Target Release: | 4.4.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1797730 (view as bug list) | Environment: | ||
Last Closed: | 2020-05-04 11:24:06 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: | 1797730 |
Description
Jian Zhang
2020-01-14 08:51:58 UTC
*** Bug 1796096 has been marked as a duplicate of this bug. *** Cluster version is 4.4.0-0.nightly-2020-02-02-225006 [jzhang@dhcp-140-36 ~]$ oc version Client Version: 4.4.0-0.nightly-2020-02-02-225006 Server Version: 4.4.0-0.nightly-2020-02-02-225006 Kubernetes Version: v1.17.1 1, Following the above steps to create a CatalogSource image: [jzhang@dhcp-140-36 ~]$ oc adm catalog build --appregistry-org=redhat-operators --to=default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/openshift/redhat:v1 INFO[0027] loading Bundles dir=/tmp/cache-435723435/manifests-012173424 INFO[0027] directory ... 2, Mirror this image to the cluster internal registry too. [jzhang@dhcp-140-36 ~]$ oc adm catalog mirror default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/openshift/redhat:v1 default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com I0203 16:45:32.489715 19982 mirror.go:230] wrote database to /tmp/408262702/bundles.db default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/ openshift4/ose-logging-curator5 blobs: registry.redhat.io/openshift4/ose-logging-curator5 sha256:ebdfbc48e7aad008a7c3c63bae79ca43b033efa91eb309355de278a7fee945a4 1.604KiB registry.redhat.io/openshift4/ose-logging-curator5 sha256:ef59a3e36b15752f81502187d80ca9bb9fe991d32b27ce0141371bb062f9b4a1 5.293KiB registry.redhat.io/openshift4/ose-logging-curator5 sha256:46b71c0b675d0ea8766a1c41ce930c5281c3d993dbfb6870355cbf313005d193 4.166MiB registry.redhat.io/openshift4/ose-logging-curator5 sha256:078444edb1ee8d4e1a401fba6e157918e7056657e6c750cd612d7e8a80b345f5 8.653MiB registry.redhat.io/openshift4/ose-logging-curator5 sha256:ba308e6b72af78ca699abbe6cc76b7eb583afb0930eadca3999d61eb575ede86 73.04MiB manifests: sha256:25920618104acbc6d0fe0bc85f2731d32629eebd595b8b961b90a26cc25134c0 stats: shared=0 unique=5 size=85.87MiB ratio=1.00 phase 0: default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com openshift4/ose-logging-curator5 blobs=5 mounts=0 manifests=1 shared=0 info: Planning completed in 4.9s uploading: default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/openshift4/ose-logging-curator5 sha256:46b71c0b675d0ea8766a1c41ce930c5281c3d993dbfb6870355cbf313005d193 4.166MiB uploading: default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/openshift4/ose-logging-curator5 sha256:ba308e6b72af78ca699abbe6cc76b7eb583afb0930eadca3999d61eb575ede86 73.04MiB uploading: default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/openshift4/ose-logging-curator5 sha256:078444edb1ee8d4e1a401fba6e157918e7056657e6c750cd612d7e8a80b345f5 8.653MiB ... LGTM, but I tried to use another source image which no tag and digest, it failed. [jzhang@dhcp-140-36 ~]$ oc adm catalog build --auth-token='basic xxx' --appregistry-org=learn-operator --to=default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/openshift/learn:v1 [jzhang@dhcp-140-36 ~]$ oc adm catalog mirror default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/openshift/learn:v1 default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com I0203 17:01:31.485081 20034 mirror.go:230] wrote database to /tmp/282905947/bundles.db W0203 17:01:31.485668 20034 mirror.go:159] couldn't parse quay.io/jiazha/learn-operator-image, skipping mirror: source references must have a tag or digest specified I0203 17:01:31.486006 20034 mirror.go:328] wrote mirroring manifests to learn-manifests [jzhang@dhcp-140-36 ~]$ cat learn-manifests/ imageContentSourcePolicy.yaml mapping.txt [jzhang@dhcp-140-36 ~]$ cat learn-manifests/imageContentSourcePolicy.yaml apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: learn spec: repositoryDigestMirrors: - mirrors: - default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/jiazha/learn-operator-image source: quay.io/jiazha/learn-operator-image [jzhang@dhcp-140-36 ~]$ cat learn-manifests/mapping.txt quay.io/jiazha/learn-operator-image=default-route-openshift-image-registry.apps.yinzhou.qe.devcluster.openshift.com/jiazha/learn-operator-image @evan if no tag and digest set in the image, can we mirror it with the "latest" tag for it automatically? Change the status to ASSIGNED first. > @evan if no tag and digest set in the image, can we mirror it with the "latest" tag for it automatically? Change the status to ASSIGNED first.
No, we can't reasonably do that at the moment. ImageContentSourcePolicy will only remap images using digests (technically it's possible to enable tag mirroring in cri-o but it is disabled in openshift) which means that even though we could put the images into the target registry, it would fail to pull when you try to install the operator on openshift.
I think it's worth discussing a feature which converts the catalog itself (i.e. modifies the catalog content to point to whatever digests the current tags point to) so that all images in a catalog are valid for mirroring by digest. I think we should track that via an RFE though, not this BZ.
Hi, Evan Yes, I agree. Thanks! Create a feature request here: https://issues.redhat.com/browse/RFE-560 Verify this bug based on comment 3, 4. 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:0581 |