Bug 1812753 - couldn't mirror image in mapping.txt created by oc adm catalog mirror
Summary: couldn't mirror image in mapping.txt created by oc adm catalog mirror
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Evan Cordell
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks: 1826432 1826434
TreeView+ depends on / blocked
 
Reported: 2020-03-12 04:20 UTC by Anping Li
Modified: 2024-10-01 16:30 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1826432 (view as bug list)
Environment:
Last Closed: 2020-08-04 18:04:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The mapping.txt generated by 'oc adm catalog mirror' (43.20 KB, text/plain)
2020-03-12 04:34 UTC, Anping Li
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 384 0 None closed oc adm catalog mirror updates: mac/windows, bundle image support, quay.io support 2021-01-25 13:50:25 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-08-04 18:04:56 UTC

Description Anping Li 2020-03-12 04:20:45 UTC
Description of problem:
The mapping.txt generated by 'oc adm catalog mirror' include destination without tags.  when mirror images using this mapping.txt. the command report erorr 'each destination tag may only be specified once: quay.io/openshift-qe-optional-operators/ose-cluster-logging-operator'.


Version-Release number of selected component (if applicable):
Client Version: 4.5.0-202003062301-8ce6126

How reproducible:
Always

Steps to Reproduce:
1.  build catalog image
oc adm catalog build   --appregistry-org=redhat-operators-stage --to=${QE_REGISTRY_PREFIX}qe-operators-registry:latest --insecure=true   --auth-token="basic $SOURCE_APPREGISTRY_ORG_TOKEN" -a $DOCKER_CONFIG_FILE

2. export manifest and generate mapping.txt
 adm catalog mirror  --manifests-only ${QE_REGISTRY_PREFIX}qe-operators-registry:latest --insecure=true  quay.io -a $DOCKER_CONFIG_FILE

3. mirror images to qa-registry
oc image mirror --insecure=true -f qe-operators-registry-manifests/mapping.txt -a $DOCKER_CONFIG_FILE

Actual results:

oc image mirror --insecure=true -f mapping.txt -a mirror_docker.conf
error: file mapping.txt, line 2: each destination tag may only be specified once: quay.io/openshift-qe-optional-operators/ose-cluster-logging-operator

cat mapping.txt
registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-cluster-logging-operator@sha256:de5d07920763f189af191c301f690b3ac945acaafed3fbc314e0e417c91db211=quay.io/openshift-qe-optional-operators/ose-cluster-logging-operator
registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-cluster-logging-operator@sha256:28e12c981441dd416fbd549ae64a3c8cf5147bd468d5b790a266e5ca8ef2d027=quay.io/openshift-qe-optional-operators/ose-cluster-logging-operator
registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-cluster-logging-operator@sha256:e7b9096dc5c88de2aad6754fac20814f6a2faca5904f928501b1dbce0d3883b4=quay.io/openshift-qe-optional-operators/ose-cluster-logging-operator
registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-cluster-logging-operator@sha256:c3b459eda6735800bc46cd5037aa6946c1c0c9f3414c9f208ae2c54f197483f5=quay.io/openshift-qe-optional-operators/ose-cluster-logging-operator

Expected results:
Option A:
The mapping file created by 'oc adm catalog mirror' can be used directly.
1) it should set a unique tag to the destination image

Optiona B:
The 'oc image mirror' support duplicated destination tag.  As the manifest are forced to be uploaded now.  I do not think the destination tag must be mandatory.

Comment 1 Anping Li 2020-03-12 04:34:21 UTC
Created attachment 1669523 [details]
The mapping.txt generated by 'oc adm catalog mirror'

Note: The description is using a different mapping.txt.

Comment 7 Anping Li 2020-05-19 05:57:05 UTC
Each images in mapping.txt have a unique tag. so move to verified.

Comment 10 errata-xmlrpc 2020-08-04 18:04:50 UTC
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 (OpenShift Container Platform 4.5 image release 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


Note You need to log in before you can comment on or make changes to this bug.