This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 535433 (RHQ-2129)

Summary: TECH PREVIEW: implement Support subsystem
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: AgentAssignee: John Mazzitelli <mazz>
Status: ASSIGNED --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cwelton, jshaughn
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-2129
Whiteboard:
Fixed In Version: 1.3 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
The git diff of changes proposed for adding <support> tag none

Description John Mazzitelli 2009-06-05 03:10:00 EDT
would like to be able to ask a plugin to take a snapshot of a resource's log files, config files and any other files and upload that snapshot report to the server.
Comment 1 John Mazzitelli 2009-06-05 03:14:15 EDT
svn rev4035 - a SnapshotReport utility is checked in. It can zip up a set of config files and log files into a single compressed zip file.

we still need a plugin API / facet so the UI can send the snapshot request down to the agent and have the agent stream up the zip file. this checkin only includes a utility that plugins can use to generate the zip file.
Comment 2 John Mazzitelli 2009-06-05 11:54:55 EDT
svn rev4036 adds the ability to tell the utility about some additional files to include in the snapshot.
Comment 3 John Mazzitelli 2009-06-06 02:46:26 EDT
svn rev4040 - can now take a snapshot of the agent from the server. only control.jsp can call it, need a UI page to do this. configuration is stored in plugin config to match how events and everything else works.
Comment 4 John Mazzitelli 2009-06-06 03:33:24 EDT
jopr svn rev721 adds support for this facet to the jboss-as plugin. i ran a quick test and it worked.

Found one issue with SnapshotReport object - it needs to crawl down subdirectories so it can get all content below the logs, conf and data directories. Need to figure out if I can use the regex's to limit what subdirectories it captures.
Comment 5 John Mazzitelli 2009-06-06 03:53:32 EDT
would like to add a new boolean config to SnapshotReport (and hence the resources' plugin config) - add a "recursive" boolean - if true, traverse down all subdirectories under config/log/data/additional directories. There should be 4 recursive props - one per config/log/data/additional dir.
Comment 6 John Mazzitelli 2009-06-06 16:28:23 EDT
rhq svn rev4041 adds the ability to recurse down subdirectories

jopr svn rev 722 adds the recurse feature and additional files snapshotting to the jboss-as plugin
Comment 7 John Mazzitelli 2009-06-09 17:26:21 EDT
implemented a prototype. This can be used in the grander design of a "support subsystem".
Comment 8 Red Hat Bugzilla 2009-11-10 15:58:24 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2129
Comment 9 John Mazzitelli 2010-04-09 12:17:01 EDT
subject was:

be able to take snapshots of a resource's log files/config files/others and upload to server
Comment 10 Jay Shaughnessy 2010-04-09 13:37:07 EDT
An issue with the work up to this point is that the SupportFacet generates no meta-data for the resource type. In other words, the plugin descriptor does not in any way declare anything related to the feature, and the db does not reflect any obvious entries to make support facet discovery obvious.  Server side detection of facet implementation is needed for (potential) Tab/Menu/Icon activation (and perspective FacetActivators).

As a temporary workaround for server side discovery we take advantage of the fact that resource types offering support snapshots define specific plugin config properties (like "snapshotConfigEnabled").  This is not a good way to perform the discovery but works for now.

A better way will be to drive off of real meta-data generated by declarations in the plugin descriptor.  The most simple addition would be a simple tag, something like:

<support>

On the ResourceType (Server or Service) descriptor.

I implemented this but it was decided to not add this change to the codebase. We think it will be better to wait until we have a chance to fully design an initial support subsystem.  We may not want to tie ourselves just yet to that specific tag.

I will try and generate a git patch with the changes, just as a historical reference to what it takes to make the change to add the <support> tag.
Comment 11 Jay Shaughnessy 2010-04-09 13:50:25 EDT
Created attachment 405598 [details]
The git diff of changes proposed for adding <support> tag

The git diff of changes proposed for adding <support> tag to plugin descriptor and driving supportfacet detection off of a flag on ResourceType.
Comment 12 Corey Welton 2010-12-23 09:29:48 EST
mazz, thoughts on jshaughn's attachment?
Comment 13 John Mazzitelli 2011-03-24 09:47:06 EDT
john sanda is looking at other things around this area (drift management). We are going to hold off on this support subsystem for a bit.