Bug 2063955

Summary: cannot download operator catalogs due to missing images
Product: OpenShift Container Platform Reporter: Alex <aflom>
Component: ocAssignee: Alex <aflom>
oc sub component: oc-mirror QA Contact: zhou ying <yinzhou>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: jpower, vdinh
Version: 4.10   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2064901 (view as bug list) Environment:
Last Closed: 2022-08-10 10:54:06 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:
Bug Depends On:    
Bug Blocks: 2064901    

Description Alex 2022-03-14 17:42:36 UTC
Description of problem:
When using the skip-missing or continue-on-error flags, oc-mirror exits with an error when images are not available to be mirrored. 

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

4.10.3


How reproducible:
When associated operator images are not available as specified within an imageset-config.

Steps to Reproduce:
1. Annotate a full operator catalog or headsOnly operator catalog within an imageset-config
2. Set '--skip-missing` or `--continue-on-error` on oc-mirror command execution.

Actual results:
```
error: unable to retrieve source image registry.redhat.io/rhpam-7/rhpam-kogito-rhel8-operator manifest sha256:7aa5491e5d26b29cd0e271d24996e587a65b50f5a8d871bd004b53da65ee0038: error parsing HTTP 404 response body: invalid character 'N' looking for beginning of value: "Not found\n"
error: unable to retrieve source image registry.access.redhat.com/ubi8/openjdk-11 manifest sha256:308113a00212e3b006e0f5a955f4743a1604b39f18aca1bf5e0275ac0aeb7d44: error parsing HTTP 404 response body: invalid character 'N' looking for beginning of value: "Not found\n"
```
Expected results:
We expect oc-mirror to generate an imageset absent the unavailable content. 

Additional info:

Comment 3 zhou ying 2022-03-24 01:31:54 UTC
Checked with oc-mirror , can see the warning now :

oc-mirror --config imageset.yaml file://  --continue-on-error
......
sha256:623281445ffba2f86d4d2708e9aaa84b566a461e9bf29f703589cdb27492dcd3 file://rhacm2/search-api-rhel8:7fa459f6
sha256:b37ffca60c5b05c429b70029e2b45e933e0e0fdbf2c9b158b085b5763f17803f file://rhacm2/search-api-rhel8:6658e1df
info: Mirroring completed in 3h57m11.03s (10.19MB/s)
WARNING one or more errors occurred                  
WARNING image "registry.redhat.io/rhpam-7/rhpam-kogito-rhel8-operator@sha256:7aa5491e5d26b29cd0e271d24996e587a65b50f5a8d871bd004b53da65ee0038" is invalid or does not exist 
WARNING image "registry.access.redhat.com/ubi8/openjdk-11@sha256:308113a00212e3b006e0f5a955f4743a1604b39f18aca1bf5e0275ac0aeb7d44" is invalid or does not exist 
INFO Creating archive /home/ocmirrortest/mirror_seq1_000000.tar 



 oc-mirror version 
Client Version: version.Info{Major:"0", Minor:"2", GitVersion:"v0.2.0-alpha.1", GitCommit:"3abb4c3fc71a815e6a3f6a90122ef4d51be67392", GitTreeState:"clean", BuildDate:"2022-03-21T21:07:36Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}

Comment 6 errata-xmlrpc 2022-08-10 10:54:06 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 (Important: OpenShift Container Platform 4.11.0 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-2022:5069