Bug 1849556

Summary: console hit runtime error when all receivers are deleted
Product: OpenShift Container Platform Reporter: shahan <hasha>
Component: Management ConsoleAssignee: Yadan Pei <yapei>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jokerman, pweil, yapei
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: console hit runtime error when all receivers are deleted Consequence: user presented with blank/white screen Fix: added null checks in code Result: user presented with 'No Receivers' empty state screen
Story Points: ---
Clone Of:
: 1849739 (view as bug list) Environment:
Last Closed: 2020-10-27 16:08:40 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:
Bug Depends On:    
Bug Blocks: 1849739, 1851088    
Attachments:
Description Flags
No Receivers Found none

Description shahan 2020-06-22 08:28:49 UTC
Description of problem:
console hit runtime error when all receivers are deleted

Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-06-20-194346

How reproducible:
Always

Steps to Reproduce:
1. goto monitoring/alertmanageryaml page, and delete all receivers including Critical, Default and Watchdog
2. refresh the page
3.

Actual results:
2. got the blank and hit runtime error:
Uncaught TypeError: Cannot read property 'filter' of undefined
    at main-chunk-b5f4dd3fa1772b07e0e5.min.js:1
    at W (main-chunk-b5f4dd3fa1772b07e0e5.min.js:1)
    at Fo (vendors~main-chunk-d1f09bab0102d8143c16.min.js:136)
    at Ks (vendors~main-chunk-d1f09bab0102d8143c16.min.js:136)
    at Bs (vendors~main-chunk-d1f09bab0102d8143c16.min.js:136)
    at Ns (vendors~main-chunk-d1f09bab0102d8143c16.min.js:136)
    at Ds (vendors~main-chunk-d1f09bab0102d8143c16.min.js:136)
    at vendors~main-chunk-d1f09bab0102d8143c16.min.js:136
    at t.unstable_runWithPriority (vendors~main-chunk-d1f09bab0102d8143c16.min.js:144)
    at li (vendors~main-chunk-d1f09bab0102d8143c16.min.js:136)

Expected results:
should not get the blank page

Additional info:

Comment 5 Yadan Pei 2020-07-02 03:01:29 UTC
Created attachment 1699588 [details]
No Receivers Found

1. admin user delete Critical and Watchdog receiver on /monitoring/alertmanagerconfig page, then remove Default receiver by editing YAML
global:
  resolve_timeout: 5m
inhibit_rules:
  - equal:
      - namespace
      - alertname
    source_match:
      severity: critical
    target_match_re:
      severity: warning|info
  - equal:
      - namespace
      - alertname
    source_match:
      severity: warning
    target_match_re:
      severity: info
receivers:               // remove this line from YAML
  - name: Default        // remove this line from YAML
route:
  group_by:
    - namespace
  group_interval: 5m
  group_wait: 30s
  receiver: Default
  repeat_interval: 12h
  routes: []
2. visit /monitoring/alertmanagerconfig page again, it will not crash, will show 'No Receivers Found' and help message


verified on 4.6.0-0.nightly-2020-06-30-020342

Comment 7 errata-xmlrpc 2020-10-27 16:08:40 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.6 GA Images), 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-2020:4196