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.
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.
commit 8d1ede47c80394e9bc7a587d21c1ed6b3baf9417 Author: Jay Shaughnessy <jshaughn> 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
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.