Bug 719394 - Enhance SupportManager.getSnapshotReport() to provide more flexibility.
Enhance SupportManager.getSnapshotReport() to provide more flexibility.
Status: NEW
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2011-07-06 13:13 EDT by Steven North
Modified: 2011-10-07 14:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
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)

  None (edit)
Description Steven North 2011-07-06 13:13:37 EDT
Description of problem:

The current snapshot operation, SupportManager.getSnapshotReport(), does not provide a caller-specified timeout value and uses a default value of 10 minutes.  The caller should be able to override the default to provide a timeout more sutiable to the situation (smaller/larger).  

Additionally, it would be useful to be able to pass parameters (as Configuration) with the request, similar to the OperationManager.scheduleResourceOperation().

The comments below suggest wrapping all the parameters to the getSnapshotReport() into a single SnapshotReportRequest.  The other way to go is to mimic  scheduleResoureOperation(), adding the parameters that make sense, timeout and 
parameters.  In either case I think you have to add a new method to preserve backwards compatibility.

<< Comments from discussion >>

There is not, no. That snapshot feature is not really to be considered 
fully built out with all the bells and whistles (this is why there is no 
easy UI interfacing to it). There is probably lots more we can do here 
to fill out that feature - this customizable timeout is one such 
feature. Can you write up a bugzilla on this.

For the record, the code gives your plugin 10 minutes to complete the 
building of the snapshot report. See the plugin container class called 

     public InputStream getSnapshotReport(int resourceId, String name, 
String description) throws Exception {
         SupportFacet facet = getSupportFacet(resourceId, 600000L); // 
give it enough time to zip up all the snapshot content

What we will probably do here is change that method API, collapse those 
parameters into a single parameter "SnapshotReportRequest" (to mimic the 
plugin API). We could then add a timeout to the request and pass it to 
the second parameter you see there to getSupportFacet.

<< End comments >>

Version-Release number of selected component (if applicable):

RHQ 4.0.0

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