Bug 1146096

Summary: Alert definition/notifications show with unknown configuration
Product: [JBoss] JBoss Operations Network Reporter: dsteigne
Component: UI, Core Server, Documentation, Monitoring - AlertsAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Sunil Kondkar <skondkar>
Severity: medium Docs Contact:
Priority: medium    
Version: JON 3.2.3CC: jshaughn, skondkar
Target Milestone: ER05   
Target Release: JON 3.3.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
It was discovered that when an alert notification definition becomes invalid, the GUI displays all notification definitions as unknown. The fix implements improvements to the server-side alert notification code. Error messages now display information that describes the issue for the invalid alert notification. Other notification definitions remain unaffected and their alert notifications display normally.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 14:01:18 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:
Attachments:
Description Flags
NotificationConfigList
none
MessageCenter none

Description dsteigne 2014-09-24 12:48:36 UTC
Description of problem:
All Alert definition/notifications show with unknown configuration if 
one of the resource's id has changed, via uninventory/re-inventory or deletion and create new.

Version-Release number of selected component (if applicable):
3.2.3

How reproducible:
Always

Steps to Reproduce:
1. Create an Alert Definition and add multiple notifications for it, i.e. a Direct Email, a CLI Script and a Resource Operation
2. Make the Resource Operation notification an Execute on an EAP Script resource.
3. Save the Alert Definition.
4. Either delete the script or uninventory the EAP Server.  Then either add the script back or re-inventory the EAP server (anything that would change the script's resourceid in the database.
5. Now navigate back to the Alert Definition > Notifications> the Script Operation notification doesn't show the resource just the script to execute (this is as expected)
6. Double-click on the Script Operation Notification as if you were going to edit it, don't add a new resource just click Cancel.
7. Now all the Configuration values for all Notifications not just the Operation show as Unknown.

Actual results:
All the Configuration values for all Notifications not just the Operation show as Unknown.


Expected results:
Only the notification with the unknown resource should show as unknown.

Additional info:

Comment 1 Jay Shaughnessy 2014-10-09 17:40:19 UTC
master commit de7eb1656ba4dcea5eac24b071e9e4d6cd4f2de9
Author: Jay Shaughnessy <jshaughn>
Date:   Thu Oct 9 13:36:46 2014 -0400

 - Don't let a bad notification summary break display of the list of summaries,
 instead show an error describing the problem (like File Not Found).  Note
 that this message comes from the server and therefore can not be localized.
 - provide better Message Center error when going into the detail dialog
 (presumably to change to a valid resource)
 - Fix a broken icon issue when viewing successful operation notifications and
 their "Deferred" status.


commit ac9ad54e1972f09d0f3aefc7805cd20a22b04e06
Author: Jay Shaughnessy <jshaughn>
Date:   Thu Oct 9 13:36:46 2014 -0400

    (cherry picked from commit de7eb1656ba4dcea5eac24b071e9e4d6cd4f2de9)
    Signed-off-by: Jay Shaughnessy <jshaughn>

Comment 3 Simeon Pinder 2014-10-21 20:24:02 UTC
Moving to ON_QA as available to test with the latest brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=394734

Comment 4 Sunil Kondkar 2014-10-31 12:05:33 UTC
Verified on JON 3.3 ER05

Verified that only the Alert definition/notifications for the Resource Operation notification where resource id is changed via uninventory/re-inventory displays the error with message - "Error! There is a problem with this notification: A resource with id <resource ID> does not exist in inventory."

All other notifications in the list shows the valid configuration details.

When double clicked on the Resource Operation notification where resource id is changed, the message center shows Error - "Cannot get alert sender configuration definition" 

Please refer the attached screenshots.

Comment 5 Sunil Kondkar 2014-10-31 12:06:45 UTC
Created attachment 952467 [details]
NotificationConfigList

Comment 6 Sunil Kondkar 2014-10-31 12:07:21 UTC
Created attachment 952468 [details]
MessageCenter