Bug 536363 - (RHQ-720) improve cascade handling for alert templates
improve cascade handling for alert templates
Product: RHQ Project
Classification: Other
Component: Alerts (Show other bugs)
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: fmatar
Jeff Weiss
: Improvement
Depends On:
Blocks: RHQ-782
  Show dependency treegraph
Reported: 2008-08-07 12:18 EDT by Joseph Marques
Modified: 2014-11-09 17:50 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
alert-template-improvements-convo.txt (13.83 KB, text/plain)
2008-08-07 12:18 EDT, Joseph Marques
no flags Details

  None (edit)
Description Joseph Marques 2008-08-07 12:18:00 EDT
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 12:19:19 EDT
this issue supersedes the suggested changes for RHQ-685.  accordingly, RHQ-685 will be closed / rejected.
Comment 2 fmatar 2008-08-11 03:56:38 EDT
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 19:28:30 EDT
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 17:09:16 EDT
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 04:02:36 EDT
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 05:50:18 EDT
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 15:07:40 EDT
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 16:15:31 EST
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

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