Bug 1964936

Summary: error log for "oc adm catalog mirror" is not correct
Product: OpenShift Container Platform Reporter: xzha
Component: OLMAssignee: Kevin Rizza <krizza>
OLM sub component: OLM QA Contact: xzha
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: xzha
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:10:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xzha 2021-05-26 11:54:15 UTC
Description of problem:
error log for "oc adm catalog mirror" is not correct

since the "--filter-by-os" is deprecated, below error log should be "--index-filter-by-os"

[root@preserve-olm-agent-test openshift-tests-private]# oc adm catalog mirror --index-filter-by-os='linux/abc' registry.redhat.io/redhat/redhat-operator-index:v4.6 localhost:5000 --manifests-only
error: the image is a manifest list and contains multiple images - use --filter-by-os to select from:

OS DIGEST
linux/amd64 sha256:4f0299265620cb29f8010308b0cfac15a8d3fe22b0422f1fdbb86ad5a3383b2a
linux/ppc64le sha256:9959915cad81b4f2b5c14316ec95980f5fd64b38ea6a1f35bcf4183f5c6147ef
linux/s390x sha256:a57764ff56ec696f372810b1202988cb0a71fc1482b13a1726e9d4e9d74715bc


Version-Release number of selected component (if applicable):

[root@preserve-olm-agent-test openshift-tests-private]# oc version
Client Version: 4.8.0-202105201328.p0.git.d0259f5.assembly.stream-d0259f5

How reproducible:
always

Steps to Reproduce:
1.oc adm catalog mirror --index-filter-by-os='linux/abc' registry.redhat.io/redhat/redhat-operator-index:v4.6 localhost:5000 --manifests-only
2.
3.

Actual results:

error log is "error: the image is a manifest list and contains multiple images - use --filter-by-os to select from:"

Expected results:
error log should be "error: the image is a manifest list and contains multiple images - use --index-filter-by-os to select from:"

Additional info:

Comment 2 xzha 2021-05-31 06:47:49 UTC
verify

[root@preserve-olm-agent-test ~]# oc version
Client Version: 4.8.0-202105281416.p0.git.9dd45e3.assembly.stream-9dd45e3

[root@preserve-olm-agent-test ~]# oc adm catalog mirror  --index-filter-by-os='linux/abc'  registry.redhat.io/redhat/redhat-operator-index:v4.6 localhost:5000 --manifests-only
error: the image is a manifest list and contains multiple images - use --index-filter-by-os to select from:

  OS            DIGEST
  linux/amd64   sha256:2a97a0753dd45d6b8ddf51c8427b65af1ffe9ff522ecf5e14773dee45e1811fa
  linux/ppc64le sha256:c3b3429eeeb74964a77c10ce81c27f2d1b7973df74e8b3c9808c31e760fb73c4
  linux/s390x   sha256:2ac5d25dce4484caf377925c28938c765d7c1b8e4024515a8d896abbc04b2eef


LGTM, verified.

Comment 5 errata-xmlrpc 2021-07-27 23:10:08 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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-2021:2438