Bug 1800658 - oc adm catalog build fails if just one of the image in the catalog is missing
Summary: oc adm catalog build fails if just one of the image in the catalog is missing
Keywords:
Status: CLOSED DUPLICATE of bug 1797730
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.3.z
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.3.z
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-07 16:33 UTC by Simone Tiraboschi
Modified: 2023-09-14 05:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-11 04:48:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1797804 0 urgent CLOSED redhat-operators catalog mirror fails due to CNV Operator manifests 2021-09-08 10:39:46 UTC

Description Simone Tiraboschi 2020-02-07 16:33:07 UTC
Description of problem:
see: https://bugzilla.redhat.com/1797804 for details

oc adm catalog build is designed to mirror the whole catalog but if just one of the images founds on the catalog, for any reasons, is missing/invalid/corrupted the tool will complete fail:

Example:

oc adm catalog build --appregistry-endpoint https://quay.io/cnr --appregistry-org redhat-operators --to=localhost:5000/my/catalog:4 --auth-token="$QUAY_TOKEN"

Uploading ... 6.967MB/s
Pushed sha256:909e71757eaf64c4d3fe952b51671a2e87e621fe6051d0501d3a16cbfafd45cd to localhost:5000/my/catalog:4
 
oc adm catalog mirror --dry-run --to-manifests manifests localhost:5000/my/catalog:4 localhost:5000

error: unable to retrieve source image registry.redhat.io/container-native-virtualization/virt-operator manifest sha256:c14ce478337b4fb57e65217ac956572db4619bf405d63d8f860ff1b53699b2fb: error parsing HTTP 404 response body: invalid character 'F' looking for beginning of value: "File not found.\""
...
W0131 22:51:32.755612    5638 mirror.go:227] errors during mirroring. the full contents of the catalog may not have been mirrored: mirroring failed: an error occurred during planning
I0131 22:51:32.789577    5638 mirror.go:298] wrote mirroring manifests to manifests
 

Version-Release number of selected component (if applicable):
oc version
Client Version: 4.3.0-0.nightly-2020-01-31-100500
Server Version: 4.3.0-0.nightly-2020-01-31-100500

How reproducible:
Always


Steps to Reproduce:
1. try to mirror a catalog with oc adm catalog build while one of the image in the catalog is missing
2.
3.

Actual results:
W0131 22:51:32.755612    5638 mirror.go:227] errors during mirroring. the full contents of the catalog may not have been mirrored: mirroring failed: an error occurred during planning
I0131 22:51:32.789577    5638 mirror.go:298] wrote mirroring manifests to manifests

Expected results:
1. the tool should provide an option to ignore errors on missing images and continue with what's available
2. the tool should provide an option to let the user blacklist broken images or packages

Additional info:

Comment 2 Red Hat Bugzilla 2023-09-14 05:52:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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