Bug 1914452

Summary: oc image append, oc image extract outputs wrong suggestion to use --keep-manifest-list=true
Product: OpenShift Container Platform Reporter: Sally <somalley>
Component: ocAssignee: Sally <somalley>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: low Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:51:26 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:

Description Sally 2021-01-08 21:43:43 UTC
The warning issued when oc chooses an os/arch digest from a manifest list should not include the suggestion to run --keep-manifest-list=true, since that flag is only exposed during mirroring.

warning comes from ProcessManifestList, exercised with extract, append, & mirror, however
oc image extract|append --keep-manifest-list is not exposed
oc image mirror --keep-manifest-list is exposed

To reproduce:

oc image append --from docker.io/library/busybox:latest --to localhost:5000/busybox:local /tmp/oc.tar.gz

mkdir ext; cd ext; oc image extract docker.io/library/busybox:latest

expected output:
"Chose linux/amd64 manifest from the list."

wrong output:
"To include the manifest list digest: sha256:4..., use --keep-manifest-list=true

Comment 2 zhou ying 2021-01-12 07:28:05 UTC
Compared with the older oc client, can't reproduce the issue now:

older version :
[root@preserver-workloadrhel-1 ~]# oc version 
Client Version: 4.7.0-fc.0


[root@preserver-workloadrhel-1 ~]# oc image append --from registry.redhat.io/openshift4/ose-must-gather:latest --to localhost:5000/busybox:local /root/oc.tar.gz --insecure 
W0112 02:22:16.320288   32346 manifest.go:414] Chose linux/amd64 manifest from the list.
To include the manifest list digest: sha256:3c473377f65b613822ed8f703ee81e374bb06e88a89b7ab92d6ecc9c68fad51f, use --keep-manifest-list=true
...

[root@preserver-workloadrhel-1 ext]#  oc image extract registry.redhat.io/openshift4/ose-must-gather:latest
W0112 02:13:45.389455   31749 manifest.go:414] Chose linux/amd64 manifest from the list.
To include the manifest list digest: sha256:3c473377f65b613822ed8f703ee81e374bb06e88a89b7ab92d6ecc9c68fad51f, use --keep-manifest-list=true


The latest oc version :

[root@preserver-workloadrhel-1 ~]# ./oc version 
Client Version: 4.7.0-0.nightly-2021-01-10-070949
Kubernetes Version: v1.19.0+d59ce34

[root@preserver-workloadrhel-1 tmp]#  mkdir ext; cd ext; oc image extract registry.redhat.io/openshift4/ose-must-gather:latest
W0112 02:17:42.165846   32043 manifest.go:414] Chose linux/amd64 manifest from the manifest list.


[root@preserver-workloadrhel-1 ~]# oc image append --from registry.redhat.io/openshift4/ose-must-gather:latest --to localhost:5000/busybox:local /root/oc.tar.gz --insecure
W0112 02:24:36.076016   32638 manifest.go:414] Chose linux/amd64 manifest from the manifest list.
Uploading ... 21.4MB/s

Comment 5 errata-xmlrpc 2021-02-24 15:51:26 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633