Bug 671496 - EAP 5 plugin fails to detect deletion of EAR, WAR content
EAP 5 plugin fails to detect deletion of EAR, WAR content
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.0.0
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-21 11:32 EST by John Sanda
Modified: 2014-07-03 15:11 EDT (History)
1 user (show)

See Also:
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: ---


Attachments (Terms of Use)

  None (edit)
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.

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