Description of problem: oc adm catalog mirror command does not add the source catalog image to the mapping.txt file to mirror to the target location. There seem to be related bugs to this opened in bugzilla, but opening again because seeing this on a different version of the oc CLI. Version-Release number of selected component (if applicable): $ oc version --client Client Version: 4.6.6 How reproducible: Always Steps to Reproduce: 1. Select a source catalog index image 2. Run oc adm catalog mirror <source> <target registry> --manifests-only=true [--filter-by-os] 3. Examine the mapping.txt file produced in the output location, and the <source> catalog index image is not included in the mapping.txt to mirror to the target location. Actual results: Catalog index image used as source is NOT mirrored to target registry. Expected results: Catalog index image used as source is successfully mirrored to target registry. Additional info: Seeing this on OCP versions 4.5.X and 4.6.0 nightly release build and most recent 4.6.6 build of oc
From my point of view, this is duplicated to 1890951. Work-a-round is to add `--filter-by-os='.*'` to oc adm catalog mirror.
Agree with Robert here, this is duplicate. *** This bug has been marked as a duplicate of bug 1890951 ***
Oh right, my bad. During the Pruning an index image [1] step the catalog index is pulled from redhat registry and pushed into local registry. Might be useful to add a part into the documentation: how to mirror the full index image with without pruning. Something like ``` oc image mirror registry.redhat.io/redhat/redhat-operator-index:v4.6 <target_registry>:<port>/<namespace>/redhat-operator-index:v4.6 ``` [1] https://docs.openshift.com/container-platform/4.6/operators/admin/olm-restricted-networks.html#olm-pruning-index-image_olm-restricted-networks