Description of problem: When running "oc adm release mirror" command with both flags "--to" and "--to-release-image" and both having a different repository URL (same registry, different org or image name), the printed "imageContentSources" example is missing the release image. Version-Release number of selected component (if applicable): 4.5.8 How reproducible: Always Steps to Reproduce: 1. Mirror with oc adm -a pull-secret.txt release mirror --from=quay.io/openshift-release-dev/ocp-release:4.5.8-x86_64 --to=quay-intern.example.com/ocp4/openshift-release-dev --to-release-image=quay-intern.example.com/ocp4/ocp-release:4.5.8-x86_64 2. Check generated imageContentSources Actual results: ~~~ imageContentSources: - mirrors: - quay-intern.example.com/ocp4/openshift-release-dev source: quay.io/openshift-release-dev/ocp-release - mirrors: - quay-intern.example.com/ocp4/openshift-release-dev source: quay.io/openshift-release-dev/ocp-v4.0-art-dev ~~~ Expected results: ~~~ imageContentSources: - mirrors: - quay-intern.example.com/ocp4/ocp-release source: quay.io/openshift-release-dev/ocp-release - mirrors: - quay-intern.example.com/ocp4/openshift-release-dev source: quay.io/openshift-release-dev/ocp-v4.0-art-dev ~~~ Additional info: It seems the printImageContentInstructions function is only considering the "--to" cli option and ignores the "--to-release-image" setting in https://github.com/openshift/oc/blob/a695d74ef1aee9a3f605d38dd8b6fae2062b63fc/pkg/cli/admin/release/mirror.go#L815
This missed my attention last sprint, as we were focused on other bugs. I will be sure to pick it up in the upcoming sprint.
Actively working on this, adding UpcomingSprint.
Sorry for the delay, opened a PR w/ oc to resolve this, thanks. Adding UpcomingSprint, to track review of the PR.
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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633