Bug 1806782
Summary: | Cannot mirror a local release to a remote registry | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Clayton Coleman <ccoleman> |
Component: | oc | Assignee: | W. Trevor King <wking> |
Status: | CLOSED ERRATA | QA Contact: | Johnny Liu <jialiu> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.3.z | CC: | aos-bugs, jokerman, kalexand, mfojtik, mfuruta, yinzhou |
Target Milestone: | --- | ||
Target Release: | 4.3.z | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: 'oc adm release mirror' lacked file:// support.
Consequence: There was no convenient way to push a release image and referenced images from a local disk to a local repository. Using file:// failed with "invalid image reference".
Fix: Taught 'oc adm release mirror' about file:// and --from-dir.
Result: 'oc adm release mirror file://openshift/release:4.3.1 --to REPO' works without failing.
|
Story Points: | --- |
Clone Of: | 1806780 | Environment: | |
Last Closed: | 2020-08-05 10:54:06 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1806780 | ||
Bug Blocks: |
Description
Clayton Coleman
2020-02-25 02:18:44 UTC
[1] needs a rebase; I just didn't get to it in time. Adding UpcomingSprint [1]: https://github.com/openshift/oc/pull/458 Cribbed doc-text from [1], which #328 picked back to 4.3 and #458 fixed. [1]: https://github.com/openshift/oc/pull/320#issue-379332698 Verified this bug with 4.3.0-0.nightly-2020-07-12-052232, and PASS. 1. mirror image to local disk file $ /home/installer1/mnt/2020-07-12-22-14-45/jialiu431_2020-07-12-22-14-45/oc adm release mirror -a /home/installer1/mirror_pullsecret_config.json --from=registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2020-07-12-052232 --to-dir=/home/installer1/mnt/2020-07-12-22-14-45/jialiu431_2020-07-12-22-14-45/data --to=file://openshift/release <--snip--> Success Update image: openshift/release:4.3.0-0.nightly-2020-07-12-052232 Mirror prefix: file://openshift/release To upload local images to a registry, run: oc image mirror --from-dir=/home/installer1/mnt/2020-07-12-22-14-45/jialiu431_2020-07-12-22-14-45/data 'file://openshift/release:4.3.0-0.nightly-2020-07-12-052232*' REGISTRY/REPOSITORY 2. move disk cross firewall 3.1 mirror to private cluster from the local disk files via `oc adm release mirror` $ oc adm release mirror --from-dir=/opt/mirror-to-disk/jialiu432_2020-07-12-23-26-27/data --from=file://openshift/release:4.3.0-0.nightly-2020-07-12-052232 --to=upshift-nointernet.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release --to-release-image=upshift-nointernet.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.3.0-0.nightly-2020-07-12-052232 <--snip--> Success Update image: upshift-nointernet.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.3.0-0.nightly-2020-07-12-052232 Mirror prefix: upshift-nointernet.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release 3.2 mirror to private from the local disk files via `oc image mirror` $ oc image mirror --from-dir=/opt/mirror-to-disk/jialiu431_2020-07-12-22-14-45/data 'file://openshift/release:4.3.0-0.nightly-2020-07-12-052232*' upshift-nointernet.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release 4. Run `oc adm release mirror -a /home/installer1/mirror_pullsecret_config.json --from=registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2020-07-12-052232 --to=upshift-nointernet.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release --to-release-image=upshift-nointernet.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.3.0-0.nightly-2020-07-12-052232 --dry-run` to get imageContentSources, inject it into install-config.yaml 5. Installation get successfull. 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.3.31 bug fix 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/RHBA-2020:3180 |