Bug 536363 (RHQ-720)

Summary: improve cascade handling for alert templates
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: AlertsAssignee: fmatar
Status: CLOSED NEXTRELEASE QA Contact: Jeff Weiss <jweiss>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.1preCC: dajohnso
Target Milestone: ---Keywords: Improvement
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-720
Whiteboard:
Fixed In Version: 1.1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 536432    
Attachments:
Description Flags
alert-template-improvements-convo.txt none

Description Joseph Marques 2008-08-07 16:18:00 UTC
the issue: cascading is a UI-based option for general properties and conditions sections for alert templates, but it is an assumed "yes" answer when updating notifications and consequential control actions.  this inconsistency causes issues with some users (RHQ-685).

the proposed solution: after much discussion (see attached convo) an alert template will *always* cascade to children resources, and thus always override local resource-level changes.  however, alert definitions will now have a new "read-only" option that can suppress/ignore changes when its parent alert template is modified.

Comment 1 Joseph Marques 2008-08-07 16:19:19 UTC
this issue supersedes the suggested changes for RHQ-685.  accordingly, RHQ-685 will be closed / rejected.

Comment 2 fmatar 2008-08-11 07:56:38 UTC
The read-only flag should be present only when the alert definition comes from an alert template definition, otherwise it shouldn't exist no?

Comment 3 Joseph Marques 2008-08-14 23:28:30 UTC
yup, the read-only checkbox should be visible for an alert definition, but not for an alert template...AND only when that definition is hooked up to a template.

Comment 4 Jay Shaughnessy 2008-08-18 21:09:16 UTC
supplemental - a related fix reported by Fady.

The problem had to do with the fact that alert template conditions are not associated with a resource but a resource type. In our latest refactoring it looks like we handled this in alert condition update, but not removal.  When we went to remove the conditions for an alert template we failed to find the associated Resource during the cache update.  I added protection such that we don't event try to update the cache when removing a template condition, and also protected at he point of failure just in case we get there from some other code path.

I made the changes in r1256.  I was able to create and delete template w/ no resources, create a template with cascade and then remove it and see the cascade removal, and create a resource-level alert def and remove it.



Comment 5 fmatar 2008-08-19 08:02:36 UTC
Now everything works fine however I'll go a bit further to remove all the cascade checks from the code and test that it doesn't affect the functionality. A final step would be to remove the cascade button from the DefinitionForm and other locations if any.

Comment 6 fmatar 2008-08-19 09:50:18 UTC
Removed all cascading related features and implemented the read-only feature. Remove the cascading calls from the API

Comment 7 Jeff Weiss 2008-09-03 19:07:40 UTC
I tested this by
Create an alert template on filesystem that will always be fired
Go into one filesystem alert tab and check the read-only box for the alert i created with the template
Go back to the alert template and edit it so that it will never fire
Check the alerts.  Before the edit of the template, alerts should be fired for all filesystems.  After editing the template, only the filesystem whose read-only box is checked should continue to be fired.

rev1304  found one minor bug that i have marked as 'depends on' this issue.

Comment 8 Red Hat Bugzilla 2009-11-10 21:15:31 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-720
Imported an attachment (id=368885)
This bug is related to RHQ-719
This bug incorporates RHQ-685