Bug 1853852 - oc adm catalog mirror --filter-by-os does not work
Summary: oc adm catalog mirror --filter-by-os does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.5.z
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard: non-multi-arch
: 1851511 (view as bug list)
Depends On: 1851817
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-04 18:54 UTC by OpenShift BugZilla Robot
Modified: 2020-07-22 12:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-22 12:20:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift oc pull 483 None closed [release-4.5] Bug 1853852: fix filter-by-os parsing for oc adm catalog mirror 2020-09-16 07:19:29 UTC
Red Hat Product Errata RHBA-2020:2956 None None None 2020-07-22 12:21:05 UTC

Description OpenShift BugZilla Robot 2020-07-04 18:54:50 UTC
+++ This bug was initially created as a clone of Bug #1851817 +++

-----This is a clone of bug 1851511 -----
Description of problem:
Unable to run oc adm catalog mirror with --filter-by-os="linux/amd64"

Version-Release number of selected component (if applicable):
oc version
Client Version: openshift-clients-4.6.0-202005210021-28-g711c56a65
Server Version: 4.5.0-0.nightly-2020-06-25-033011
Kubernetes Version: v1.18.3+77c9a6a


How reproducible:
always

Steps to Reproduce:
1.oc adm catalog mirror registry.redhat.io/openshift4/ose-operator-registry:v4.4 quay.io/tbuskey/xyzzy:v4.4 --filter-by-os="linux/amd64"

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

  OS            DIGEST
  linux/amd64   sha256:59ebe755481e26b340f0c02784bab6ff43d7dbc1be1ca56f5056ffc70daed271
  linux/ppc64le sha256:46aeaa82a28507fa0c44dadda6b6d6ecd65fbf8cd20ad4f0bb222b86cabb8bcd
  linux/s390x   sha256:d86dad0f8925370c4a4ea45c3856ea58eac49f8733b31fe6f76be1839f5f6750

Expected results:
To have it mirror

Additional info:

Comment 5 Jian Zhang 2020-07-20 02:34:57 UTC
1, Check the `oc` version
[root@preserve-olm-env client]# ./oc version -o yaml
clientVersion:
  buildDate: "2020-07-17T21:38:38Z"
  compiler: gc
  gitCommit: b66f2d3a6893be729f1b8660309a59c6e0b69196
  gitTreeState: clean
  gitVersion: openshift-clients-4.5.0-202006231303.p0-4-gb66f2d3a6
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64
releaseClientVersion: 4.5.0-0.nightly-2020-07-18-024505
...

2, Mirroring a catalogsource image that contains some multi-arch operator's images.

[root@preserve-olm-env client]# ./oc adm catalog mirror quay.io/olmqe/catalogsource:cluster-logging localhost:5000/olmqe45 --filter-by-os to="linux/amd64"
using database path mapping: /:/tmp/214421313
wrote database to /tmp/214421313
using database at: /tmp/214421313/bundles.db
localhost:5000/
  olmqe45/openshift4-ose-logging-fluentd
    blobs:
      registry.redhat.io/openshift4/ose-logging-fluentd sha256:82a8f4ea76cb6f833c5f179b3e6eda9f2267ed8ac7d1bf652f88ac3e9cc453d1 1.561KiB
      registry.redhat.io/openshift4/ose-logging-fluentd sha256:68374908cbf6dbdf4ec1ffd7c7becab87c1ef5d8bd7893fb63384773f1cdd7a7 5.067KiB
      registry.redhat.io/openshift4/ose-logging-fluentd sha256:a61a94c048c2e5240eea49afffa19b4c73545002c7e3a755957fc7e8f535695d 3.339MiB
      registry.redhat.io/openshift4/ose-logging-fluentd sha256:3f8da17b5090f672f011b5bfcff4856360af616b275f37ffa98a7528b5dd1823 20.28MiB
      registry.redhat.io/openshift4/ose-logging-fluentd sha256:a3ac36470b00df382448e79f7a749aa6833e4ac9cc90e3391f778820db9fa407 72.74MiB
    manifests:
      sha256:2cd9223d0d4ee1967c39f4c22a3ce5fe1ae657bb1cc055ed7b4abaa1fdc0e3aa -> 3c3660fa
  stats: shared=0 unique=5 size=96.36MiB ratio=1.00

phase 0:
  localhost:5000 olmqe45/openshift4-ose-logging-fluentd blobs=5 mounts=0 manifests=1 shared=0

info: Planning completed in 1.85s
uploading: localhost:5000/olmqe45/openshift4-ose-logging-fluentd sha256:a61a94c048c2e5240eea49afffa19b4c73545002c7e3a755957fc7e8f535695d 3.339MiB
...
info: Planning completed in 1.71s
info: Mirroring completed in 0s (0B/s)
wrote mirroring manifests to catalogsource-manifests

3, Check the mirrored images.
[root@preserve-olm-env client]# curl -k --user test:redhat https://localhost:5000/v2/_catalog 
{"repositories":["olmqe45/openshift4-ose-cluster-logging-operator","olmqe45/openshift4-ose-logging-curator5","olmqe45/openshift4-ose-logging-elasticsearch5","olmqe45/openshift4-ose-logging-fluentd","olmqe45/openshift4-ose-logging-kibana5","olmqe45/openshift4-ose-oauth-proxy"]}

LGTM, verify it.

Comment 6 Jian Zhang 2020-07-20 02:41:07 UTC
*** Bug 1851511 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2020-07-22 12:20: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:2956


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