Bug 2099637 - Should print error when use --keep-manifest-list=false for manifestlist image
Summary: Should print error when use --keep-manifest-list=false for manifestlist image
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: Arda Guclu
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-21 11:39 UTC by zhou ying
Modified: 2022-08-10 11:18 UTC (History)
1 user (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 1176 0 None open Bug 2099637: Use filter options only when keep-manifest-list is true 2022-06-22 06:01:27 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:18:58 UTC

Description zhou ying 2022-06-21 11:39:01 UTC
Description of problem:
Should print error when use --keep-manifest-list=false for manifestlist image 

Version-Release number of selected component (if applicable):
oc version --client
Client Version: 4.11.0-202206151603.p0.g63bee3e.assembly.stream-63bee3e
Kustomize Version: v4.5.4

How reproducible:
always

Steps to Reproduce:
1. check the image with manifestlists:
oc image info quay.io/openshift-release-dev/ocp-release@sha256:53f9b6813375453a999f9942bab08cf83aae4d9990a34618a72c48ef26d28ca8
Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations.
error: the image is a manifest list and contains multiple images - use --filter-by-os to select from:

  OS            DIGEST
  linux/amd64   sha256:d94da3b54283c4fded7f12a26f019428cf10fdfc1401e049400f653bffc69e19
  linux/ppc64le sha256:368ab3f78812fdaa345699ac458d6766a5654639e83ee6f83a6ce86d6828f872
  linux/s390x   sha256:2f27d9df324963b2612a8fda49f9131d88149530fe1a6dc1c927c1057db5bc88
  linux/arm64   sha256:bc2eaa40ac49d35509dabb861c948b7b0f0dc3337aa1085503e99dbba44d0114
2. With --keep-manifest-list=false for the manifestlist image :
`oc adm release mirror --from quay.io/openshift-release-dev/ocp-release@sha256:53f9b6813375453a999f9942bab08cf83aae4d9990a34618a72c48ef26d28ca8 --keep-manifest-list=false  --to=localhost:5000/newmirrortestfalse  --apply-release-image-signature --insecure`


Actual results:
2. No error  and the command succeed.

Expected results:
2. Should give an error when  use --keep-manifest-list=false for manifestlist image

Additional info:

Comment 3 zhou ying 2022-06-24 07:48:38 UTC
can't reproduce the issue now:


[root@localhost ~]# oc version --client
Client Version: 4.11.0-0.nightly-2022-06-24-041539
Kustomize Version: v4.5.4
[root@localhost ~]# oc adm release mirror --from quay.io/openshift-release-dev/ocp-release@sha256:53f9b6813375453a999f9942bab08cf83aae4d9990a34618a72c48ef26d28ca8 --keep-manifest-list=false  --to=localhost:5000/newmirrortestfalse  --apply-release-image-signature --insecure
Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations.
error: unable to retrieve release image info: unable to parse image quay.io/openshift-release-dev/ocp-release@sha256:53f9b6813375453a999f9942bab08cf83aae4d9990a34618a72c48ef26d28ca8: unknown image manifest of type *manifestlist.DeserializedManifestList from manifest sha256:53f9b6813375453a999f9942bab08cf83aae4d9990a34618a72c48ef26d28ca8

[root@localhost ~]# oc image info quay.io/openshift-release-dev/ocp-release@sha256:53f9b6813375453a999f9942bab08cf83aae4d9990a34618a72c48ef26d28ca8
Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations.
error: the image is a manifest list and contains multiple images - use --filter-by-os to select from:

  OS            DIGEST
  linux/amd64   sha256:d94da3b54283c4fded7f12a26f019428cf10fdfc1401e049400f653bffc69e19
  linux/ppc64le sha256:368ab3f78812fdaa345699ac458d6766a5654639e83ee6f83a6ce86d6828f872
  linux/s390x   sha256:2f27d9df324963b2612a8fda49f9131d88149530fe1a6dc1c927c1057db5bc88
  linux/arm64   sha256:bc2eaa40ac49d35509dabb861c948b7b0f0dc3337aa1085503e99dbba44d0114

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