Bug 1831698 - oc adm catalog build fails due to multiarch images
Summary: oc adm catalog build fails due to multiarch images
Keywords:
Status: CLOSED DUPLICATE of bug 1827544
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.3.z
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ---
: 4.5.0
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
: 1832151 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-05 14:00 UTC by Andrew Bays
Modified: 2023-12-15 17:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: should indicate that we should use `--filter-by-os` on `oc adm catalog mirror` Consequence: Not setting this field will cause mirroring to fail, now that the base image is multi arch Fix: Add `--filter-by-os` in the examples for mirroring (`=linux/amd64` is a reasonable default to show) Result:
Clone Of:
Environment:
Last Closed: 2020-05-28 11:53:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 423 0 None closed Bug 1827544: provide better defaults for oc adm catalog build 2020-11-26 12:54:58 UTC

Description Andrew Bays 2020-05-05 14:00:56 UTC
Description of problem:

When attempting to create an offline OLM catalog for a disconnected OCP 4.3 cluster, the command `oc adm catalog build` can not handle multiarch images like ose-operator-registry (https://catalog.redhat.com/software/containers/detail/5cddd0bed70cc57c44b2e1f3)

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

4.3

How reproducible:

Always

Steps to Reproduce:
1. Following this guide: https://docs.openshift.com/container-platform/4.3/operators/olm-restricted-networks.html, and the error will occur on step #2 of the procedure for "Building an Operator catalog image"

Actual results:

oc adm catalog build     --appregistry-org redhat-operators     --from=registry.redhat.io/openshift4/ose-operator-registry:v4.3     --to=registry.webscale
nm-lab.com:5000/olm/redhat-operators:v1     -a ${REG_CREDS}     --insecure
...
INFO[0020] directory                                     dir=/tmp/cache-145147172/manifests-378392797 file=4.2-s390x load=package                                                             
INFO[0020] directory                                     dir=/tmp/cache-145147172/manifests-378392797 file=4.3 load=package                                                                   
INFO[0020] directory                                     dir=/tmp/cache-145147172/manifests-378392797 file=4.4 load=package      
...
error: unable to parse image registry.redhat.io/openshift4/ose-operator-registry:v4.3: unknown image manifest of type *manifestlist.DeserializedManifestList from manifest sha256:56e8a4340ebb2d919c125b3c24b9b74bf843698f894d1da1c8dc5267dea52e67

Expected results:

Pushed < some sha256 manifest > to registry.webscale.nm-lab.com:5000/olm/redhat-operators:v1

Comment 1 Evan Cordell 2020-05-06 18:09:05 UTC
Mentioned in the doc text, but a workaround for now is to set `--filter-by-os="linux/amd64"` when running `oc adm catalog build` (or the target arch if not linux/amd64)

Comment 2 Evan Cordell 2020-05-06 18:10:30 UTC
*** Bug 1832151 has been marked as a duplicate of this bug. ***

Comment 3 Evan Cordell 2020-05-15 17:19:47 UTC
The attached PR provides defaults for this flag, so it should only be needed if targeting a lesser-used arch.


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