Bug 2090751 - oc image mirror skip-missing flag does not skip images
Summary: oc image mirror skip-missing flag does not skip images
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.11
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-26 13:28 UTC by iwatson
Modified: 2022-08-10 11:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:14:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 1105 0 None open Bug 2090751: Correcting skipMissing flag usage when a manifest cannot be found 2022-05-27 17:04:00 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:14:54 UTC

Description iwatson 2022-05-26 13:28:32 UTC
Description of problem:

This issue has been raised upstream in https://github.com/openshift/oc/issues/1104

PR in https://github.com/openshift/oc/pull/1105

The SkipMissing flag in oc image mirror is incomplete. Currently this flag does not fulfil its purpose which has a knock on effect for oc-mirror. 


The knock on effect for oc-mirror is documented in https://bugzilla.redhat.com/show_bug.cgi?id=2089918

How reproducible: 100%

Steps to Reproduce:

Try use the skip-missing flag with oc image mirror to mirror a image that doesn't exist and see the return code is not 0. You can use any image that returns 404 aka anything random or even something like this which should be there but isn't.

registry.redhat.io/openshift-gitops-1/argocd-rhel8 sha256:ff4ad30752cf0d321cd6c2c6fd4490b716607ea2960558347440f2f370a586a8

Comment 4 zhou ying 2022-06-06 03:15:16 UTC
can't reproduce with latest version :

oc-mirror version 
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.11.0-202206030929.p0.gb22233e.assembly.stream-b22233e", GitCommit:"b22233e611ab4692748ffc992a235abd9c231ecf", GitTreeState:"clean", BuildDate:"2022-06-03T10:12:00Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}

[root@localhost operatorheadonly48]# oc-mirror  --config setting.yaml file://    --skip-missing
Found: oc-mirror-workspace/src/publish
Found: oc-mirror-workspace/src/v2
Found: oc-mirror-workspace/src/charts
backend is not configured in setting.yaml, using stateless mode
backend is not configured in setting.yaml, using stateless mode
No metadata detected, creating new workspace
WARN[0024] DEPRECATION NOTICE:
Sqlite-based catalogs and their related subcommands are deprecated. Support for
them will be removed in a future release. Please migrate your catalog workflows
to the new file-based catalog format. 
....

Comment 6 errata-xmlrpc 2022-08-10 11:14:33 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.