Bug 721154

Summary: unable to delete an alert template with lots of child alertdefs via the GUI
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Core UIAssignee: Robert Buck <rbuck>
Status: CLOSED WORKSFORME QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: urgent    
Version: 4.0.1CC: ccrouch, hrupp, jshaughn, rbuck
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-12 19:53:42 UTC 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: 717358, 729848, 730796    
Attachments:
Description Flags
screenshot none

Description Ian Springer 2011-07-13 21:11:48 UTC
I have an alert template defined, which has around 100k child alertdefs. I go to #Administration/Configuration/Templates/Alert/10033 to view the list of templates for the resource type for which the template is defined, and I select the template and click the Delete button. After 10 seconds, the gwt rcp operation times out and displays the following warning in the GUI:

Failed to deleted the selected alert definitions. This occurred because the server is taking a long time to complete this request. Please be aware that the server may still be processing your request and it may complete shortly. You can check the server logs to see if any abnormal errors occurred.
Severity :	
Warning
	
Time :	
Wednesday, July 13, 2011 4:59:53 PM Etc/GMT+4
Detail :	
com.google.gwt.http.client.RequestTimeoutException:A request timeout has expired after 10000 ms
--- STACK TRACE FOLLOWS ---
A request timeout has expired after 10000 ms
    at Unknown.com_google_gwt_http_client_RequestTimeoutException_$RequestTimeoutException__Lcom_google_gwt_http_client_RequestTimeoutException_2Lcom_google_gwt_http_client_Request_2ILcom_google_gwt_http_client_RequestTimeoutException_2(Unknown source:0)
    at Unknown.com_google_gwt_http_client_Request_$fireOnTimeout__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
    at Unknown.com_google_gwt_http_client_Request$3_run__V(Unknown source:0)
    at Unknown.com_google_gwt_user_client_Timer_fire__V(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)


At this point, I would think the template deletion would continue to proceed on the Server side and the template would eventually get deleted. However, I waited several hours, and the template was still listed in the GUI. 

I tried this with a 2nd template that only had 300 child alertdefs, and I was able to delete that fine (though I did still get the gwt rpc timeout), so I think the deletion failure has to do with the template having so many child alertdefs.

Comment 1 Ian Springer 2011-07-13 22:19:24 UTC
I just noticed that for the template I was able to delete successfully (the one with only 300 child alertdefs), the child alertdefs were not deleted. I would have expected them to be deleted along with their parent template, or at least to have been given the option to delete them. When I went to #Reports/Subsystems/AlertDefinitions and clicked on the View Parent link for one of the child alertdefs, I was taken to #Administration/Configuration/Templates/Alert/10008/120171 (presumably 120171 was the id of the template I deleted). There was no error, but all of the fields on the all of the tabs were blank...

Comment 2 Ian Springer 2011-07-13 22:21:24 UTC
Created attachment 512762 [details]
screenshot

Comment 3 Jay Shaughnessy 2011-08-16 20:53:55 UTC
Need to prove this works or doesn't work, say with 10001 alert defs created via template and at least 50 alerts per def.

Comment 4 Charles Crouch 2011-10-10 20:03:45 UTC
The urgent piece of this bug is making sure the template delete operation is 
functionally correct, looking at Ian's comment it does not appear to be.

Assuming the operation is working correctly, we need to see how long the 
request takes on a reasonably large environment, as Jay mentions.
My preference would be to do as much of this async or pseudo-async as possible 
(i.e. hit the ok button and within 10seconds get message saying your request is 
being processed, and you are free to move around the ui and do other stuff 
while the request completes) However if thats impractical then we should try to 
mitigate the situations via the gwt timeout for the page

Comment 5 Robert Buck 2011-10-12 19:53:42 UTC
This works for me; I created a template alert definition which became associated with 1010 resources and deletion took 28 seconds, and it did not error out. Further, the scrolling of the alerted resources showed little lag, taking only two or perhaps three seconds to render the list when scrolled quickly.