Bug 824503 - unable to remove deployment without manifest file when agent runs under different user as server
Summary: unable to remove deployment without manifest file when agent runs under diffe...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: 4.2
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
: JON 3.1.0
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 790753
Blocks: 758753
TreeView+ depends on / blocked
 
Reported: 2012-05-23 15:45 UTC by Stefan Negrea
Modified: 2013-09-03 15:18 UTC (History)
5 users (show)

Fixed In Version:
Clone Of: 790753
Environment:
Last Closed: 2013-09-03 15:18:43 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Negrea 2012-05-23 15:45:42 UTC
+++ 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 15:47:04 UTC
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:
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=28f5c74ec24267eecf6ffe1e36a01a012e5c7198

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=7b36fe4ad315679ea2e66431bbe5067037e1d539

Comment 2 Armine Hovsepyan 2012-08-17 15:19:25 UTC
verified.

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 15:18:43 UTC
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.