Bug 1926457 - oc adm catalog mirror errors when using a file output destination
Summary: oc adm catalog mirror errors when using a file output destination
Keywords:
Status: CLOSED DUPLICATE of bug 1919168
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-08 20:02 UTC by Andrew Sullivan
Modified: 2021-06-07 17:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-07 17:58:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrew Sullivan 2021-02-08 20:02:34 UTC
Description of problem:
Attempting to mirror a catalog index, whether pruned or not, to disk for migrating to a disconnected network results in errors preventing the images from being mirrored and an empty imageContentSourcePolicy.

Version-Release number of selected component (if applicable):
Tested with oc version 4.6.12 and 4.5.31

How reproducible:
Every time.

Steps to Reproduce:
1. Optionally, create a pruned index image:

opm index prune \
 -f registry.redhat.io/redhat/redhat-operator-index:v4.6 \
 -p kubevirt-hyperconverged \
 -t registry.domain.name:5000/cnv-operator-index:v4.6

2. Mirror the catalog to disk:

oc adm catalog mirror \
 registry.domain.name:5000/cnv-operator-index:v4.6 \
 file:///redhat \
 --filter-by-os='.*'

Actual results:

All images in the index return the following errors:

[ansulliv@bastion mirror]$ oc adm catalog mirror registry.domain.name:5000/cnv-operator-index:v4.6 file:///redhat --filter-by-os='.*'
src image has index label for database path: /database/index.db
using database path mapping: /database/index.db:/tmp/796358406
wrote database to /tmp/796358406
using database at: /tmp/796358406/index.db
error parsing target reference for {/file:/redhat-container-native-virtualization-hyperconverged-cluster-operator@sha256:c47d457c5e3c0d34cc4659243c64d9e1a6589b9459e087ba5a4822578aea93b0 /file:/redhat-container-native-virtualization-hyperconverged-cluster-operator:75796bf0}, skip writing to ImageContentSourcePolicy
error parsing target reference for {/file:/redhat-container-native-virtualization-virt-cdi-controller@sha256:afe11653815be24b3fb12191cd556d3291ff639059a0fb800585889acbb603c8 /file:/redhat-container-native-virtualization-virt-cdi-controller:82d97157}, skip writing to ImageContentSourcePolicy

Expected results:
Images successfully mirrored to disk.

Additional info:
Verified that mirroring a pruned index from a public registry directly to a local registry does work as expected with oc 4.6.12, e.g.:

oc adm catalog mirror registry.domain.name:5000/cnv-operator-index:v4.6 registry.domain.name:5000 --filter-by-os='.*'

Comment 2 Kevin Rizza 2021-06-07 17:58:27 UTC
This appears to be a duplicate of an issue that was already closed and backported to 4.6. Closing as DUPLICATE.

*** This bug has been marked as a duplicate of bug 1919168 ***


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