Red Hat Bugzilla – Bug 824503
unable to remove deployment without manifest file when agent runs under different user as server
Last modified: 2013-09-03 11:18:43 EDT
+++ This bug was initially created as a clone of Bug #790753 +++
Description of problem: Latest Stefan's changes in content system added new feature: RHQ-Sha256 value is being written into manifest of deployed WAR once it becomes managed by content subsystem. My WAR is deployed exploded and it is as simple as it does not have manifest. I run server under user eap and agent under root. I come in to troubles when I need to undeploy my app (using JON UI). Agent tries to add RHQ-Sha256 to manifest and when it does not exist, it creates it, with root's permissions.
Version-Release number of selected component (if applicable):
Build Number: dd8a001:c5270fb
Steps to Reproduce:
1.have JON server, agent (run under root), EAP 5 (run under any non-privileged user)
2. deploy WAR without manifest to EAP as exploded
3. updateBackingContent of your WAR using CLI (I suppose that this action triggers writing RHQ-SHA256 to manifest)
4. remove WAR from server using JON UI
Actual results: remove operation seems to succeed, but deployment is rediscovered and maked as offline, on server, manifest created by JON remains in deployment's dir
Expected results: not sure, maybe agent could read and use permissions of deployment dir when creating manifest
Additional info: This is not a common usecase. Most WARs have manifest and also running agent under root is not recommended.
This BZ already had a partial fix prior to the release of RHQ 4.4. The only case not in the original solution was storing the SHA256 for exploded deployments when creating a webapp as new child of the server. This has now been fixed.
release/jon3.1.x branch commits:
Case is the following:
1. Install war with manifest to EAP5 as child war -> delete from UI
2. Install war without manifest to EAP5 as child war -> delete from UI
3. Install war without manifest to EAP5 as bundle - > delete from UI
4. Install war without manifest to EAP5 as child war -> Get ProxyFactory.getResource(warId)-> updateBackingContent -> delete from UI
1-3 cases for eap6 has been checked as well.
In all cases the war is not being visible anymore in discovery queue or inventory list.
Bulk closing of old issues in VERIFIED state.