This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes

Bug 671496

Summary: EAP 5 plugin fails to detect deletion of EAR, WAR content
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: jshaughn
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: 2014-07-03 15:11:26 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description John Sanda 2011-01-21 11:32:53 EST
Description of problem:
In the EAP 5 plugin, EARs and WARs and managed resources that support backing content. Among other things this means that when viewing a managed EAR or WAR in the UI, the Content tab will be visible and accessible. During content discovery the plugin container will call the discoverDeployedPackages method of each plugin component that implements the ContentFacet. The plugin component class in this case is StandaloneManagedDeploymentComponent.

If no content/packages are found, discoverDeployedPackages should return an empty set. Then the plugin container would compare those results against the current, known deployed content at which point it would determine that content has been deleted. These results would be sent up to the server and an appropriate entry would be logged in the package history for the ear/war file indicating that the content is not available. Here is the first couple lines of StandaloneManagedDeploymentComponent.discoverDeployedPackages,

if (!this.deploymentFile.exists())
            throw new IllegalStateException("Deployment file '" + this.deploymentFile + "' for "
                + getResourceDescription() + " does not exist.");

By throwing that exception content discovery is halted for that particular resource. No content discovery report will be sent up to the server; thus, the server will not become aware of the ear/war file getting deleted.

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


How reproducible:


Steps to Reproduce:
1. Get a managed EAP 5 instance into inventory 
2. Deploy test.war (which is attached to this BZ)
3. Verify that the content has been discovered. It make take a few minutes but you should see test.war in the inventory browser in the UI, and the Conent tab should be visible and accessible.
4. Manually delete test.war from the EAP 5 instance. (i.e., rm <jboss_home>/server/default/deploy/test.war)
5. Wait 5 minutes or so for content discovery to run.
  
Actual results:
test.war will have an availability of DOWN, but there is no update in its package history to indicate that the content has been deleted.

Expected results:
There should be an update in the package history for test.war indicating that the content is no longer available. More specifically, entry in the package history should have a status of MISSING.

Additional info:
Comment 1 Jay Shaughnessy 2014-07-03 15:11:26 EDT
For relevant types we can now implement the MISSING avail feature.  Those RFE's can be created as needed. Closing this one.