Bug 2140977 - Alerts number is not correct on Virtualization overview
Summary: Alerts number is not correct on Virtualization overview
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.12.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.13.0
Assignee: Hilda Stastna
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks: 2144839
TreeView+ depends on / blocked
 
Reported: 2022-11-08 09:57 UTC by Guohua Ouyang
Modified: 2023-01-24 13:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2144839 (view as bug list)
Environment:
Last Closed: 2023-01-24 13:41:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 980 0 None open Bug 2140977: Display correct number of Alerts on Overview page 2022-11-21 15:17:43 UTC
Red Hat Issue Tracker CNV-22358 0 None None None 2022-11-09 09:17:31 UTC
Red Hat Product Errata RHSA-2023:0408 0 None None None 2023-01-24 13:41:58 UTC

Comment 1 Hilda Stastna 2022-11-09 12:45:26 UTC
Hi Guohua,

I was not successful in reproducing the bug. The number of alerts is displayed correctly.

You just might have overlooked that there is a drop down in the left of Alerts card, where you can choose to "Show virtualization health alerts" vs "Show all alerts". 

There is "Show virtualization health alerts" in the screenshot you've provided. Try to change that to "Show all alerts" and to see if all of them are displayed or not.
This is probably why you didn't see all the alerts. Please take a look into this and close this bug eventually, or update the info. Thank you.

Comment 2 Guohua Ouyang 2022-11-10 03:27:10 UTC
Hi Hilda,
It looks odd to me, shouldn't the number change accord to the selection of "Show virtualization health alerts"/"Show all alerts"?

Comment 3 Hilda Stastna 2022-11-10 08:57:35 UTC
Guohua,

well, it depends on the type of the alerts you have. You need to check for your example. If all the alerts you have are virtualization health alerts,
then changing between "Show virtualization health alerts" and "Show all alerts" lead to no change of the number of the alerts displayed in the card.
If only some of the alerts are virtualization health ones, then you will see the different number with "Show virtualization health alerts" (lower number),
comparing to "Show all alerts".

Comment 4 Hilda Stastna 2022-11-10 13:38:43 UTC
Can you, please, take a look into this again? Comment 3
And if you will still think there is a bug, please add a picture or video, as it can help a lot to reproduce the bug.
Thank you very much in advance.

Comment 5 Guohua Ouyang 2022-11-11 06:24:17 UTC
I understand if the selection is changed the alerts items are changed too.
But do you see the total number is 6 and the details alerts below only have 5, isn't it a problem?

Comment 6 Hilda Stastna 2022-11-12 16:09:23 UTC
Hi Guohua,

thanks for checking it. Now I understand, what exactly you meant as a bug in here: the total number of Alerts is always displayed, no matter what we choose in the drop down.
However, I am not sure if this is a bug. Let me discuss that with Yifat (UX). I'll update this ticket once I get more info. Thank you.

Comment 7 Guohua Ouyang 2022-11-14 09:45:39 UTC
(In reply to Hilda Stastna from comment #6)
> Hi Guohua,
> 
> thanks for checking it. Now I understand, what exactly you meant as a bug in
> here: the total number of Alerts is always displayed, no matter what we
> choose in the drop down.
> However, I am not sure if this is a bug. Let me discuss that with Yifat
> (UX). I'll update this ticket once I get more info. Thank you.

I discussed the issue with Yifat today, and we agree to remove the total number of alerts in the title.

Comment 8 Yifat Menchik 2022-11-14 10:05:03 UTC
Hi, I think the number of the total alerts should always match the sum of all the types.
If we can't calculate this, I'm fine with omitting the total number of the alerts (shown in brackets at the title).

Comment 9 Hilda Stastna 2022-11-14 16:42:05 UTC
Hi all,

thank you very much for your responses. After more discussion with Foday, we found that this is not a bug,
because we always want to display the total number of alerts, and that is already calculated and implemented.
"In both cases, we show the total number of alerts in the top left".
So I am closing this bug.

Comment 10 Yifat Menchik 2022-11-15 17:07:36 UTC
After discussing this with @rsdeor we agreed that 
1. for Administrator we should always count the number of “virtualization health alerts” - the ones that don’t have the VM badge next to them.
2. If the admin selects to see “show all alerts” we should show the virtualization health alerts + all the vm alerts in the selected NS.
The number of critical, warning, info alerts is calculated correctly. Can you take the numbers from there?
Thanks.

Comment 11 Ronen 2022-11-15 17:30:33 UTC
@hstastna and @fkargbo to me the numbers should be consistent so I do think it's a bug.
We have two types of alerts: Virtualization and VM.
As an Administrator (or a cluster viewer) I have two options:
 1. I can choose to see only the Virtualization alerts, so the total alerts should not count alerts coming from VMs
 2. I can choose to ALSO see alerts coming from VMs, and in this case, the total number of alerts should be the Virtualization alerts + VM alerts in the selected namespace (or All Namespaces)

As a user (not a cluster admin) I must work in a single namespace, in this case the number of alerts is the number of VM alerts in the selected namespace

Comment 12 Hilda Stastna 2022-11-16 13:32:20 UTC
Thank you very much, Ronen and Yifat, according to your last comments I am reopening the bug.

Comment 13 Hilda Stastna 2022-11-18 19:11:30 UTC
Fixing:
https://github.com/kubevirt-ui/kubevirt-plugin/pull/975

Comment 14 Hilda Stastna 2022-11-21 15:18:25 UTC
Fixing for 4.13:
https://github.com/kubevirt-ui/kubevirt-plugin/pull/980

Comment 15 Guohua Ouyang 2022-11-23 02:22:49 UTC
verified on v4.13.0-1141

Comment 20 errata-xmlrpc 2023-01-24 13:41:51 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 (Important: OpenShift Virtualization 4.12.0 Images security 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/RHSA-2023:0408


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