Bug 674558

Summary: Detect deletion of resources that occur outside of RHQ
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: InventoryAssignee: RHQ Project Maintainer <rhq-maint>
Status: NEW --- QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecified   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
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:
Cloudforms Team: ---

Description John Sanda 2011-02-02 08:56:46 EST
Description of problem:
Today RHQ automatically imports into inventory services that are discovered. For example, the EAR and WAR files deployed to a managed EAP server are automatically imported into inventory. These resources are automatically imported even when they are deployed to the EAP server out of band, that is, outside of RHQ. If a WAR file is deleted out of band, RHQ will report it as having an availability of DOWN, but the resource is not automatically purged from inventory.

I think we are a bit inconsistent here in our approach. Here is something else to further my point. WAR and EAR files are content backed resources. There will be a resource in inventory that represents a managed WAR file. There is also at least one entry in the content subsystem for that WAR file. (There may be more entries in the content subsystem if different versions of the WAR file is deployed.) At some point after a WAR file is deleted out of band, content discovery runs on the agent, and it will be determined that the WAR has been deleted. After the content discovery report is sent up to the server and is processed, the WAR file is removed from the content subsystem.

We automatically import some child resource types. We automatically purge content for those resource types. We do not however automatically purge those resources. Where this becomes problematic is when I try to distinguish between a DOWN resource that still exists versus one that has been deleted out of band. As it stands right now, I do not see where RHQ offers a good way to make that determination.

Another solution other automatically purging resources, albeit less robust, could involve flagging the resource in some way to indicate that it may have been deleted out of band. This is probably less work that doing the automatic purge, but it is much less robust because it still requires the user to manually purge the resource.
Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
I mentioned that when a WAR/EAR file is deleted out of band, it is eventually and automatically purged from the content subsystem; however, this is only the case currently with the jboss-as plugin. The content is not automatically purged with the jboss-as-5 plugin due to bug 671496.