Bug 1848425 - Affinity modal closes when user attempts to edit existing rule with [Exists, DoesNotExist] operator
Summary: Affinity modal closes when user attempts to edit existing rule with [Exists, ...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.5.z
Assignee: Gilad Lekner
QA Contact: Guohua Ouyang
: 1852392 (view as bug list)
Depends On: 1848418
TreeView+ depends on / blocked
Reported: 2020-06-18 11:11 UTC by Radim Hrazdil
Modified: 2020-07-22 12:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1848418
Last Closed: 2020-07-22 12:20:41 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 5772 0 None closed Bug 1848425: Affinity modal closes when user attempts to edit 2020-07-20 02:20:34 UTC
Github openshift console pull 5858 0 None closed [release-4.5.z] Bug 1848425: Affinity modal closes when user attempts to edit 2020-07-20 02:20:34 UTC
Red Hat Product Errata RHBA-2020:2956 0 None None None 2020-07-22 12:21:08 UTC

Description Radim Hrazdil 2020-06-18 11:11:13 UTC
+++ This bug was initially created as a clone of Bug #1848418 +++

Description of problem:

When an affinity rule is added with Exists or DoesNotExist operators, the affinity modal closes when user tries to edit such rule.
Error in terminal:
Uncaught error Uncaught TypeError: Cannot read property 'map' of undefined

Version-Release number of selected component (if applicable):
console/release-4.5 and console/master
OCP 4.4.5
CNV 2.3

How reproducible:

Steps to Reproduce:
1. Add affinity rule with node selector 'test' and operator DoesNotExist
2. Save, Save
3. Open Affinity modal dialog and try to edit the affinity rule

Actual results:
Affinity modal is closed

Expected results:

Additional info:

Comment 3 Radim Hrazdil 2020-06-24 08:19:09 UTC
I can verify that rule added with Exists or DoesNotExist operators can be deleted and edited without issue, however, rules with In and NotIn operator are now causing the following error when I try to delete them (kebab -> delete -> Save)

Danger alert:An error occurred
Error "spec.template.spec.affinity in body must be of type object: "null"" for field "undefined".

@Kobi, please advise, should I move to assigned and retaget 4.5.z?

Comment 4 Yaacov Zamir 2020-06-24 08:47:17 UTC
Thanks, yes.

Comment 5 Yaacov Zamir 2020-06-24 09:04:06 UTC
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1848418

Comment 6 Yaacov Zamir 2020-06-30 10:43:31 UTC
*** Bug 1852392 has been marked as a duplicate of this bug. ***

Comment 7 Yaacov Zamir 2020-06-30 10:47:36 UTC
submitted upstream: https://github.com/openshift/console/pull/5858

Comment 9 Tomas Jelinek 2020-07-10 05:39:04 UTC
patch ready, just waiting for 4.5.z to open to be merged.

Comment 12 Guohua Ouyang 2020-07-20 06:54:30 UTC
verified on upstream 4.5 branch which has PR #5858 included, the issue is fixed.

Comment 14 errata-xmlrpc 2020-07-22 12:20:41 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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