Bug 2098610 - No need to check the push permission with –manifests-only option
Summary: No need to check the push permission with –manifests-only option
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-06-20 07:59 UTC by zhou ying
Modified: 2022-08-10 11:18 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:18:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc-mirror pull 490 0 None open Bug 2098610: fix(mirror): removes push permission check with manifest-only is used 2022-06-21 13:31:36 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:18:56 UTC

Description zhou ying 2022-06-20 07:59:30 UTC
Description of problem:
No need to check the push permission with –manifests-only option 

Version-Release number of selected component (if applicable):
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"}


How reproducible:
Always

Steps to Reproduce:
Use oc-mirror with –manifests-only option:
`oc-mirror --from mirror_seq1_000000.tar docker://localhost:5000  --manifests-only  -v 9`



Actual results:
The manifests-only only generate manifests and do not mirror anything, so no need to do the push permissions check . 
`oc-mirror --from mirror_seq1_000000.tar docker://localhost:5000  --manifests-only  -v 9`
Checking push permissions for localhost:5000
Using image localhost:5000/oc-mirror to check permissions
Extracting incoming metadata
looking for metadata file at "publish/.metadata.json"
Writing image mapping to oc-mirror-workspace/results-1655687973/mapping.txt
Writing ICSP manifests to oc-mirror-workspace/results-1655687973

Expected results:
No need to check push permissions with manifests-only options.


Additional info:

Comment 4 zhou ying 2022-06-23 12:47:28 UTC
checked with latest version , the issue has fixed:

oc-mirror version 
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.11.0-202206221527.p0.gd979763.assembly.stream-d979763", GitCommit:"d97976353cc9383a0f01027ec233bf1872ef1ba8", GitTreeState:"clean", BuildDate:"2022-06-22T15:55:20Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}

oc-mirror --from mirror_seq1_000000.tar docker://localhost:5000  --manifests-only  -v 9
Extracting incoming metadata
looking for metadata file at "publish/.metadata.json"
Writing image mapping to oc-mirror-workspace/results-1655988393/mapping.txt
Writing ICSP manifests to oc-mirror-workspace/results-1655988393

Comment 5 errata-xmlrpc 2022-08-10 11:18:42 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.