+++ 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
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
Affinity modal is closed
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?
*** Bug 1852392 has been marked as a duplicate of this bug. ***
submitted upstream: https://github.com/openshift/console/pull/5858
patch ready, just waiting for 4.5.z to open to be merged.
verified on upstream 4.5 branch which has PR #5858 included, the issue is fixed.
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.