Bug 2015024 - Payload imagestream new tags not properly updated during cluster upgrade
Summary: Payload imagestream new tags not properly updated during cluster upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.9.z
Assignee: Jack Ottofaro
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On: 2014071
Blocks: 2015025
TreeView+ depends on / blocked
 
Reported: 2021-10-18 09:13 UTC by OpenShift BugZilla Robot
Modified: 2021-11-01 13:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-01 13:44:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-version-operator pull 678 0 None open [release-4.9] Bug 2015024: lib/resourcemerge/imagestream.go: Copy all data for new tag reference 2021-10-20 08:36:51 UTC
Red Hat Product Errata RHBA-2021:4005 0 None None None 2021-11-01 13:44:51 UTC

Description OpenShift BugZilla Robot 2021-10-18 09:13:31 UTC
+++ This bug was initially created as a clone of Bug #2014071 +++

Created attachment 1832928 [details]
driver-toolkit tag broken after cluster upgrade

Description of problem:

When the CVO updates an imagestream which contains *new* tags, the new tags are created without a name.


How reproducible: 100%


Steps to Reproduce:

look at the tags of the driver-toolkit imagestream after a cluster upgrade (upgrade must include an update of RHCOS version):

> oc get is/driver-toolkit -n openshift  -oyaml


Actual results:

the imagesteam tag is populated with the right `from` image, but the `name` field is empty


Expected results:

the imagestream tag must be populated with their name, according to the specification of the new imagestream


Additional info:

in this block: https://github.com/openshift/cluster-version-operator/blob/14d93a158e163f06c2ee936ee29c9c94da7f35fe/lib/resourcemerge/imagestream.go#L22-L27

the value of `required.Name` is lost and not set in `existing.Name`

Comment 2 Kevin Pouget 2021-10-21 20:34:59 UTC
Changed the severity to 'high' as the GPU operator (DTK  based driver builds) upgrades will be broken without this fix. 
Manual Workaround exists.

Comment 5 XiuJuan Wang 2021-10-25 02:09:18 UTC
Verified https://github.com/openshift/cluster-version-operator/pull/678 before pr merged. Mark it to verified

Comment 7 Kevin Pouget 2021-10-27 08:26:43 UTC
To detect if a cluster is affected by this bug, search for a tag with an empty name:

> oc get -n openshift is/driver-toolkit '-ojsonpath={.spec.tags[?(@.name=="")]}' 
>> {"annotations":null,"from":{"kind":"DockerImage","name":"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:71207482fa6fcef0e3ca283d0cafebed4d5ac78c62312fd6e19ac5ca2294d296"},"generation":5,"importPolicy":{"scheduled":true},"name":"","referencePolicy":{"type":"Source"}}

To work around the bug:

> oc delete -n openshift is/driver-toolkit
> # imagestream is recreated correctly by the ClusterVersionOperator
> oc get imagestream.image.openshift.io/driver-toolkit
> NAME             IMAGE REPOSITORY                                                            TAGS                          UPDATED
> driver-toolkit   image-registry.openshift-image-registry.svc:5000/openshift/driver-toolkit   49.84.202110142155-0,latest   4 minutes ago

Comment 9 errata-xmlrpc 2021-11-01 13:44:33 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 (OpenShift Container Platform 4.9.5 bug fix 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/RHBA-2021:4005


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