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='.*'
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 ***