Bug 586131 - Make sure alert notification plugins handle subject/role removal gracefully
Summary: Make sure alert notification plugins handle subject/role removal gracefully
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Alerts
Version: unspecified
Hardware: All
OS: Linux
high
medium vote
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks: jon24-alert-notify
TreeView+ depends on / blocked
 
Reported: 2010-04-26 21:06 UTC by Charles Crouch
Modified: 2015-02-01 23:26 UTC (History)
1 user (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-12 16:46:33 UTC


Attachments (Terms of Use)

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@redhat.com>
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.


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