Bug 1914452 - oc image append, oc image extract outputs wrong suggestion to use --keep-manifest-list=true
Summary: oc image append, oc image extract outputs wrong suggestion to use --keep-mani...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.7.0
Assignee: Sally
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-08 21:43 UTC by Sally
Modified: 2021-02-24 15:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:51:26 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 688 0 None closed Bug 1914452: Fix the manifest list warning when choosing an os/arch digest from list 2021-01-21 23:49:23 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:51:37 UTC

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


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