Bug 1110434 - Remote AlertDefinitionManager API does not handle template or group level definitions correctly
Remote AlertDefinitionManager API does not handle template or group level def...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Alerts, CLI, REST (Show other bugs)
4.11
Unspecified Unspecified
high Severity high (vote)
: GA
: RHQ 4.12
Assigned To: Jay Shaughnessy
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-17 11:59 EDT by Jay Shaughnessy
Modified: 2014-12-15 06:36 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-15 06:36:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jay Shaughnessy 2014-06-17 11:59:48 EDT
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 12:00:45 EDT
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 13:13:50 EDT
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.

 Also:
 - 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 06:36:19 EST
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.