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

Bug 1788156

Summary: oc adm release can not handle multiarch images
Product: OpenShift Container Platform Reporter: philipp.dallig
Component: ocAssignee: Maciej Szulik <maszulik>
oc sub component: oc QA Contact: zhou ying <yinzhou>
Status: CLOSED DEFERRED Docs Contact:
Severity: low    
Priority: low CC: maszulik, mfojtik, scuppett, somalley, wking
Version: 4.5   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-04 15:35:06 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 philipp.dallig 2020-01-06 14:58:49 UTC
Description of problem:
The command `oc adm release` can not handle multiarch images like prometheus (https://quay.io/repository/prometheus/prometheus?tab=tags)

How reproducible:


Steps to Reproduce:
1. oc adm release new --from-release=quay.io/openshift/okd@sha256:5d2e42d555d24bb1a60d20eb03ae7e288f4347cad6a68c5428d00598c5816678 --to-image=harbor.mycompany.com/openshift/okd:4.3.0-mycompany-2 --name=4.3.0-mycompany-2 prometheus=quay.io/prometheus/prometheus:v2.14.0


Actual results:
info: Loading sha256:888cfbc650f259fd138452baf25938093cfa361e367317c89e9544d8f4cf9181 machine-api-operator
info: Loading sha256:6625bb97a35604080af348340f0788df36455352b1a039f073cb6894c548fb78 machine-config-operator
info: Loading sha256:45d1a32851d706ad27d7301a4859a78d1ae11703f24f85d42f12b6321c54eaf3 operator-lifecycle-manager
info: Loading sha256:e3787d6293cbb08301f274f661fa725cab0990902188711ad7c16ed6af7bd6c7 operator-marketplace
error: unable to parse image quay.io/prometheus/prometheus:v2.14.0: unknown image manifest of type *manifestlist.DeserializedManifestList from manifest sha256:907e20b3b0f8b0a76a33c088fe9827e8edc180e874bd2173c27089eade63d8b8

Expected results:
command should run successful.

Comment 1 Stephen Cuppett 2020-01-06 19:24:31 UTC
Moving to target 4.4 (active development branch). Fixes (if any) and backports (if requested/required) will result in cloned BZs for those releases as well.

Comment 2 Michal Fojtik 2020-05-12 10:54:12 UTC
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

As such, we're marking this bug as "LifecycleStale".

If you have further information on the current state of the bug, please update it, otherwise this bug will be automatically closed in 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

Comment 3 OpenShift BugZilla Robot 2020-05-21 00:20:32 UTC
This bug hasn't had any activity 7 days after it was marked as LifecycleStale, so we are closing this bug as WONTFIX. If you consider this bug still valuable, please reopen it or create new bug.

Comment 4 philipp.dallig 2020-06-05 12:13:20 UTC
Hi this bug is still reproducible with the current oc binary. Downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/
$ oc version
Client Version: 4.5.0-202005291417-9933eb9
Server Version: 4.4.0-0.okd-2020-04-21-163702-beta4
Kubernetes Version: v1.17.1

Steps to Reproduce:
1. oc adm release new --from-release=quay.io/openshift/okd:4.4.0-0.okd-2020-05-23-055148-beta5 --to-image=harbor.mycompany.com/openshift/okd:4.4.0-mycompany --name=4.4.0-mycompany prometheus=quay.io/prometheus/prometheus:v2.18.1

Comment 6 Michal Fojtik 2020-06-05 13:06:47 UTC
The LifecycleStale keyword was removed, because the needinfo? flag was reset or the bug received blocker/security keyword.
The bug assignee was notified.

Comment 7 Maciej Szulik 2020-06-18 10:00:58 UTC
I’m adding UpcomingSprint, because I was occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. I will revisit this bug next sprint.

Comment 8 Sally 2020-07-10 19:55:09 UTC
I recently inherited this bug, so I’m adding UpcomingSprint, because I was occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. I will revisit this bug next sprint.

Comment 9 Sally 2020-07-10 20:55:49 UTC
I am able to create the release image with that prometheus image if I first
$ oc image mirror quay.io/prometheus/prometheus:v2.18.2 myregistry:5000/prometheus:v2.18.2
then
$ oc adm release --from-release=quay.io/openshift/okd:4.4.0-0.okd-2020-05-23-055148-beta5 --to-image=myregistry:5000/openshift/okd:4.4.0-local prometheus=myregistry:5000/prometheus:v2.18.2

I think this is a matter of documenting the 'oc adm release' command.  Again, I'll look into improving this (documentation, usage menu) in the upcoming sprint.

Comment 10 philipp.dallig 2020-07-14 13:42:39 UTC
Hi Sally,

I think you've found a workaround with your mirror command. I would prefer a fix for oc, so it can handle a multiarch images.

Comment 11 Sally 2020-07-30 22:13:13 UTC
'oc' lacks the logic to pick the single manifest from a multi-arch image in 'oc adm release new'. Here's a better workaround, while we add the necessary logic:

$ oc image mirror quay.io/prometheus/prometheus:v2.14.0=mirror-registry:5000/prometheus --dry-run
This will give you the correct manifest to pass to 'oc adm release new' in my case "amd64", I see this in dry-run output:

    manifests:
      sha256:3d53ce329b25cc0c1bfc4c03be0496022d81335942e9e0518ded6d50a5e6c638 -> v2.14.0

Then this will succeed:

$ oc adm release new --from-release=quay.io/openshift/okd:4.4.0-0.okd-2020-05-23-055148-beta5 --to-image=localhost:5000/openshift/okd:4.4.0-local prometheus=quay.io/prometheus/prometheus@sha256:3d53ce329b25cc0c1bfc4c03be0496022d81335942e9e0518ded6d50a5e6c638



I'll be working on adding the logic during this upcoming sprint

Comment 12 Sally 2020-08-20 19:44:06 UTC
The linked PR that resolves this bug is waiting for review, merge.  Moving to UpcomingSprint.

Comment 13 Sally 2020-09-11 13:45:26 UTC
The linked PR is being reviewed and updated, hoping to get this merged in upcoming sprint.

Comment 14 Sally 2020-10-01 21:23:11 UTC
Other bugs took precedence last sprint and this continues to wait for review - adding UpComingSprint tag.

Comment 15 Sally 2020-10-23 18:01:00 UTC
Waiting on PR review, as other bugs/reviews took priority last sprint, adding UpcomingSprint.

Comment 17 Sally 2020-11-12 17:01:03 UTC
Actively working on this, PR is under review, adding UpcomingSprint

Comment 18 Sally 2020-12-04 23:55:32 UTC
PR is waiting on review, adding to upcoming sprint

Comment 19 Sally 2021-01-14 22:30:55 UTC
The linked PR that resolves this should be merged within the next sprint.

Comment 24 Maciej Szulik 2022-07-04 15:35:06 UTC
This has been handled as part of https://issues.redhat.com/browse/WRKLDS-370