Bug 824503 - unable to remove deployment without manifest file when agent runs under different user as server
unable to remove deployment without manifest file when agent runs under diffe...
Product: RHQ Project
Classification: Other
Component: Content (Show other bugs)
Unspecified Linux
unspecified Severity high (vote)
: ---
: JON 3.1.0
Assigned To: Stefan Negrea
Mike Foley
Depends On: 790753
Blocks: 758753
  Show dependency treegraph
Reported: 2012-05-23 11:45 EDT by Stefan Negrea
Modified: 2013-09-03 11:18 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 790753
Last Closed: 2013-09-03 11:18:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stefan Negrea 2012-05-23 11:45:42 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):
Version: 3.0.1.GA
Build Number: dd8a001:c5270fb

How reproducible:always

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.
Comment 1 Stefan Negrea 2012-05-23 11:47:04 EDT
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:

Comment 2 Armine Hovsepyan 2012-08-17 11:19:25 EDT

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.
Comment 3 Heiko W. Rupp 2013-09-03 11:18:43 EDT
Bulk closing of old issues in VERIFIED state.

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