Red Hat Bugzilla – Bug 671496
EAP 5 plugin fails to detect deletion of EAR, WAR content
Last modified: 2014-07-03 15:11:26 EDT
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,
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):
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.
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.
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.
For relevant types we can now implement the MISSING avail feature. Those RFE's can be created as needed. Closing this one.