Bug 568544

Summary: Alerts, alert history lists duplicate alerts.
Product: [Other] RHQ Project Reporter: wes hayutin <whayutin>
Component: AlertsAssignee: Lukas Krejci <lkrejci>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: high    
Version: 3.0.0CC: bkearney, ckannan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://10.16.120.51:7080/rhq/subsystem/alertHistory.xhtml
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:47:55 UTC Type: ---
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: 565617    
Attachments:
Description Flags
ss01
none
ss02
none
screenshot of debugger variables
none
ss none

Description wes hayutin 2010-02-25 23:12:03 UTC
Created attachment 396423 [details]
ss01

May be related to https://bugzilla.redhat.com/show_bug.cgi?id=568537

I'm going to open this and discuss the issue w/ Justin.
I *think* but it may be hard to tell that there are duplicate alerts listed in the alert history.

See screenshots

The alert history on the resource lists the alert history correctly.
The alert history in the system view lists duplicates and looks incorrect to me.

Comment 1 wes hayutin 2010-02-25 23:12:31 UTC
Created attachment 396425 [details]
ss02

Comment 2 Heiko W. Rupp 2010-02-26 14:35:21 UTC
duplication also happens on the definition list in the subsystems view.

Comment 4 Heiko W. Rupp 2010-02-26 15:21:40 UTC
Created attachment 396561 [details]
screenshot of debugger variables

Comment 5 Heiko W. Rupp 2010-02-26 15:27:36 UTC
Lukas,

this is a result of the resource name shortening effort.

In org.rhq.enterprise.gui.common.paging.ResourceNameDisambiguatingPagedListDataModel#fetchPage()

data is ok (2 different alerts), but the call to 
resourceManager.disambiguate(data, alwaysIncludeParents, getResourceIdExtractor()); 
returns duplicates

disambiguation.resoultion[*].original contains one of the two original data items

See attached screen shot.

Something similar happens for alert definition history (except that not all entries are the same, but dups appear too).

Comment 6 Lukas Krejci 2010-02-26 15:52:15 UTC
This is because the disambiguate() method wrongly assumes that each item in the provided results correspond to a different resource (or none at all).

In case of alerts, multiple alerts can be triggered from a single resource and thus violate that assumption.

Comment 7 Lukas Krejci 2010-02-26 17:01:06 UTC
Commit 8a0951a fixes this.

Comment 8 wes hayutin 2010-03-09 19:36:59 UTC
verified.. alerts now have unique names

Comment 9 wes hayutin 2010-03-09 19:37:34 UTC
Created attachment 398906 [details]
ss

Comment 10 wes hayutin 2010-03-10 14:19:33 UTC
moving verified bugs to rhq_sprint06, and removing from rhq_chainsaw

Comment 11 Corey Welton 2010-08-12 16:47:55 UTC
Mass-closure of verified bugs against JON.