Bug 1807807 - oc image mirror --from-dir does not override --dir
Summary: oc image mirror --from-dir does not override --dir
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Paul Weil
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks: 1807810
TreeView+ depends on / blocked
 
Reported: 2020-02-27 09:56 UTC by Paul Weil
Modified: 2020-07-13 17:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Complete gives error error: you must specify at least one source image to pull and the destination to push to as SRC=DST or SRC DST [DST2 DST3 ...] if only --from-dir is specified even though it is supposed to override --dir. Consequence: --from-dir does not override --dir Fix: --from-dir overrides --dir Result: --from-dir overrides --dir as explained in help
Clone Of:
: 1807810 (view as bug list)
Environment:
Last Closed: 2020-07-13 17:21:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4952051 None None None 2020-04-09 05:53:37 UTC
Red Hat Product Errata RHBA-2020:2409 None None None 2020-07-13 17:22:11 UTC

Description Paul Weil 2020-02-27 09:56:15 UTC
Description of problem: Complete gives error error: you must specify at least one source image to pull and the destination to push to as SRC=DST or SRC DST [DST2 DST3 ...] if only --from-dir is specified even though it is supposed to override --dir.



How reproducible: Always


Steps to Reproduce:
1. mirror a release to a directory using 'release mirror' command
2. attempt to mirror the directory back to a registry with 'image mirror' command specifying --from-dir (do not speicfy --dir)

./oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=/tmp/mirror-file file://openshift/release:4.3.3* ${LOCAL_REGISTRY}/ocp-4.3


Actual results:
error: you must specify at least one source image to pull and the destination to push to as SRC=DST or SRC DST [DST2 DST3 ...]


Expected results: directory mirrors to registry

Comment 3 XiuJuan Wang 2020-03-12 05:34:56 UTC
Test with oc client 4.5.0-202003100316-ed0e664, and passed

$./oc version 
Client Version: 4.5.0-202003100316-ed0e664
Server Version: 4.5.0-0.nightly-2020-03-11-214319
Kubernetes Version: v1.17.1

$./oc adm release mirror registry.svc.ci.openshift.org/ocp/release:4.5.0-0.nightly-2020-03-11-230807 --to-dir=bz1807807
$./oc image mirror --from-dir=bz1807807 'file://openshift/release:4.5.0-0.nightly-2020-03-11-230807*' vsphere.mirror-registry.qe.devcluster.openshift.com:5000/xiuwang

Could mirror image successfully from dir without error.

Comment 5 errata-xmlrpc 2020-07-13 17:21:42 UTC
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, 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:2409


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