Bug 2089918 - oc-mirror skip-missing still returns 404 errors when images do not exist
Summary: oc-mirror skip-missing still returns 404 errors when images do not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.11.0
Assignee: Alex
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-24 17:47 UTC by Jennifer Power
Modified: 2022-08-10 11:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:14:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc-mirror pull 484 0 None open [WIP] Bug 2089918: adds fix for --skip-missing flag processing 2022-06-03 12:55:40 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:14:15 UTC

Description Jennifer Power 2022-05-24 17:47:27 UTC
Description of problem:
oc-mirror return 404 errors for missing images when skip-missing is used

Version-Release number of selected component (if applicable):
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.2.0-alpha.1-42-ge3e6bf9", GitCommit:"e3e6bf9f", GitTreeState:"clean", BuildDate:"2022-05-24T17:31:23Z", GoVersion:"go1.17.1", Compiler:"gc", Platform:"linux/amd64"}


How reproducible:
100%

Steps to Reproduce:
1. Generate a config
apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
storageConfig:
  local:
    path: metadata
mirror:
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
      packages:
        - name: ptp-operator
          channels:
            - name: stable
          minVersion: '4.10.0-202205121158'
2. Run oc-mirror with skip-missing
oc-mirror --config ~/configs/imageset-config.yaml docker://localhost:5001 --skip-missing

Actual results:

404 errors returned

Expected results:

No 404 errors

Additional info:

Comment 2 zhou ying 2022-06-13 03:50:09 UTC
with older version could reproduce :
oc-mirror version 
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.11.0-202206090038.p0.g49a4f17.assembly.stream-49a4f17", GitCommit:"49a4f1789993d90dc9763cb527a57fd70f9ae0e9", GitTreeState:"clean", BuildDate:"2022-06-09T01:20:22Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}

    manifests:
      sha256:209c8f43ffb954e7a500e58823992ecd631c8f9c4c83ece10eaaed20f024139b
      sha256:8b606d5c487f4e016cfbf2160c6bee2276243e97da0cd16792458be656cc8835
      sha256:209c8f43ffb954e7a500e58823992ecd631c8f9c4c83ece10eaaed20f024139b -> 33b50287
  stats: shared=443 unique=5171 size=168.2GiB ratio=0.89

error: unable to retrieve source image registry.redhat.io/rhel9-beta/tang-operator-bundle manifest sha256:be7053361e3a0e2639b4f4e242aca4ed28aa467f41273ee303228e159d0fef04: error parsing HTTP 404 response body: invalid character 'N' looking for beginning of value: "Not found\n"
error: unable to retrieve source image registry.redhat.io/rhel9-beta/tang-operator manifest sha256:9963167fe37897473167d5b1af578881592479093e086d2ffb7ff4b7bec4d39e: error parsing HTTP 404 response body: invalid character 'N' looking for beginning of value: "Not found\n"
error: an error occurred during planning



can't reproduce with latest version , the error has changed to warning, and the mirror will continue:
./oc-mirror version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.11.0-202206101306.p0.g01d488f.assembly.stream-01d488f", GitCommit:"01d488f6b1cbab2a199f41ee03d143658605184f", GitTreeState:"clean", BuildDate:"2022-06-10T16:58:35Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}

Comment 4 errata-xmlrpc 2022-08-10 11:14:04 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


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