Bug 1110434 - Remote AlertDefinitionManager API does not handle template or group level definitions correctly
Summary: Remote AlertDefinitionManager API does not handle template or group level def...
Alias: None
Product: RHQ Project
Classification: Other
Component: Alerts, CLI, REST
Version: 4.11
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: GA
: RHQ 4.12
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
Depends On:
TreeView+ depends on / blocked
Reported: 2014-06-17 15:59 UTC by Jay Shaughnessy
Modified: 2014-12-15 11:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-12-15 11:36:19 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 738799 None None None Never

Internal Links: 738799

Description Jay Shaughnessy 2014-06-17 15:59:48 UTC
When testing Bug 738799 it was noted that the failure occurred when the template removal was performed via the GUI but not via REST.

This led to the discovery that the GUI was going through the correct "local" SLSBs for the level of alert definition being dealt with: template/group/resource.  But REST, like the CLI or any other remote client was using the only published remote API: AlertDefinitionManagerRemote.

The public API for enable/disable/remove of alert definitions was basically treating everything as a resource-level alert definition.  So, the API calls above, if called at the template or group level, were not affecting all of the resource-level children.

Comment 1 Jay Shaughnessy 2014-06-17 16:00:45 UTC
After some discussion it was decided that in fact these methods should handle any alert definition and do the right thing.  The other option was to open up remote APIs/REST endpoints specific to each level of alert definition.  This option was rejected for both usability and maintenance reasons, keeping the exposed API smaller and more flexible is preferred.

Comment 2 Jay Shaughnessy 2014-06-17 17:13:50 UTC
commit 8d1ede47c80394e9bc7a587d21c1ed6b3baf9417
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Tue Jun 17 12:17:15 2014 -0400

 - Repair the AlertDefinitionManagerRemote API such that enable/disable/remove
   methods operate on any combination of template,group or resource level
   alert definitions.
 - Properly jdoc the remote API methods, and improve some locals jdoc as well
 - Improve the transactioning to avoid a single umbrella transaction when
   invoking the API on multiple group and/or template alert definitions.
 - Convert GUI to use the enhanced remote API methods to benefit from
   the transactioning improvments and to shrink the generated Async API.
 - Improve i-test to use remote api and ensure child, resource-level
   alert defs are being handled properly.

 - fix a problem with authz on alert template viewing. It should not
   require MANAGE_SETTINGS to view alert defs via  getAlertDefinitionById().
 - fix a long-standing bug where child alert-defs of templates or groups were
   not properly detached at remove-time of the parent, which could cause
   GUI failures when visiting the resource-level alert definitions.
 - remove some unused named queries from AlertDefinition

Comment 3 Heiko W. Rupp 2014-12-15 11:36:19 UTC
Bulk close of items fixed in RHQ 4.12

If you think this is not solved, then please open a *new* BZ and link to this one.

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