Bug 586131

Summary: Make sure alert notification plugins handle subject/role removal gracefully
Product: [Other] RHQ Project Reporter: Charles Crouch <ccrouch>
Component: AlertsAssignee: Joseph Marques <jmarques>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: medium Docs Contact:
Priority: high    
Version: unspecifiedCC: hbrock
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:46:33 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: 577217    

Description Charles Crouch 2010-04-26 21:06:57 UTC
The new alert notification plugins need to make sure they handle the case where items they depend on have been removed from the inventory, e.g. the user email plugin should handle a user being deleted from JON, the operations plugin should handle a resource referenced by it being removed from the inventory.

Handling here means not blowing up during the execution of an alert notification and not spamming the server log file every time an alert fires.

The idea here is to work as well as JON2.3 when it came to handling the above situations.

Comment 1 Joseph Marques 2010-06-23 21:54:29 UTC
commit 27c3aca4240c7fcbb5e2685c0970b3ff7c764c63
Author: Joseph Marques <joseph>
Date:   Wed Jun 23 17:42:57 2010 -0400

    BZ-586131: upon subject/role deletion, graceful removal of data from affected AlertNotification

-----

results of this change are as follows:

* when users are removed from RHQ, they are removed from all alert notifications they were attached to (already fired alerts / audit trail is not affected)
* when roles are removed from RHQ, they are removed from all alert notifications they were attached to (already fired alerts / audit trail is not affected)

Comment 2 Sudhir D 2010-06-25 08:45:58 UTC
I tested this on Build#42 jon-server-2.4.0.GA_QA. 

The user condition fail. Meaning, the alert notification still have the deleted user entry and report successfully sent the e-mail. 

I can see that the role is being gracefully reomoved from the alert notification.

Moving this back to ON_DEV.

Comment 3 Joseph Marques 2010-06-25 13:28:16 UTC
Sudhir, please retry this.  Delete your "System Users" alert notification, and then add it back.  Theh try removing one or more of the users.  I suspect the reason this failed is because I recently had to change the storage mechanism for the configuration data associated with an alert notification for this bug.

Comment 4 Sudhir D 2010-06-29 10:08:16 UTC
I re tested this on the new build, jon-server-2.4.0.GA_QA build# 43 and the user was removed gracefully from the alert notificaton when deleted. 

Marking this bug as verified.

Comment 5 Corey Welton 2010-08-12 16:46:33 UTC
Mass-closure of verified bugs against JON.