Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2087579

Summary: ` --keep-manifest-list=true` does not work for `oc adm release new` , only pick up the linux/amd64 manifest from the manifest list
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: ocAssignee: Maciej Szulik <maszulik>
oc sub component: oc QA Contact: zhou ying <yinzhou>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: mfojtik, psundara, wking
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.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: 2022-08-10 11:12:53 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 zhou ying 2022-05-18 04:58:01 UTC
Description of problem:
the oc adm release new command with/without  --keep-manifest-list=true, but only pick up the linux/amd64 manifest from the manifest list even on Darwin OS

Version-Release number of selected component (if applicable):
 oc version --client
Client Version: 4.11.0-202205131639.p0.g75056e7.assembly.stream-75056e7

How reproducible:
always

Steps to Reproduce:
1.use the `oc adm release new` command with --keep-manifest-list=true for manifest list ;


Actual results:
1.  Only pick the linux/amd64 manifest from the manifest list even on Darwin OS.

`oc adm release new --reference-mode=source --keep-manifest-list=true -f 12708358_4.11.0-0.nightly-multi-2022-04-18-120932-release-imagestream.yaml  --name 4.11.0-0.nightly-multi-mac --to-image=ec2-3-142-132-40.us-east-2.compute.amazonaws.com:5000/ocp-release:4.11.0-0.nightly-multi-mac`
info: Found 171 images in image stream
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.
W0516 17:28:33.541302   37864 manifest.go:442] Chose linux/amd64 manifest from the manifest list.
W0516 17:28:33.548647   37864 manifest.go:442] Chose linux/amd64 manifest from the manifest list.

Expected results:
1. Should create multi-arch payload for --keep-manifest-list=true

Additional info:

Comment 1 Prashanth Sundararaman 2022-05-18 16:57:00 UTC
this is not a bug. if you look at this comment in the PR: https://github.com/openshift/oc/pull/1120/commits/39d1efe95981d4aee0af4d37bb9cf53e359af56c#diff-e6940b2e20b2d94c645cf8b70ce7839fc297bd225f080e852773e7906ca8ce34R921, it makes it clear that the manifests chosen for each individual arch payload inside the manifestlist are ones from the amd64 image because when you specify --keep-manifest-list, the manifestlist for all the component images are retained and so they are the same across all arches. You can do an oc image info on the component images to confirm that.

The generated image should have component images which are manifestlisted.

Comment 2 Maciej Szulik 2022-05-25 10:32:41 UTC
Moving to qa since Prashanth observation is correct.

Comment 5 errata-xmlrpc 2022-08-10 11:12:53 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