Bug 824151

Summary: JBossAS 5 plugin: when redeploying the same war, original file is renamed
Product: [JBoss] JBoss Operations Network Reporter: Larry O'Leary <loleary>
Component: Agent, Content, Plugin -- JBoss EAP 5Assignee: Stefan Negrea <snegrea>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: JON 3.0.1CC: fbrychta, hrupp, jsanda, snegrea
Target Milestone: ---   
Target Release: JON 3.1.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 820650 Environment:
Last Closed: 2013-09-11 11:02:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 820650    
Bug Blocks: 824498    

Description Larry O'Leary 2012-05-22 20:18:27 UTC
+++ This bug was initially created as a clone of Bug #820650 +++

Description of problem:
I deployed a standalone web application on JBossAS 5 using JON (create child>web application). When i redeploy the same war (content>new>upload new package), original file in jBoss deploy directory is renamed and application is unreachable using original URL.

Version-Release number of selected component (if applicable):
Version: 3.1.0.GA
Build Number: 07775cb:4ccefd7

How reproducible:
always

Steps to Reproduce:
1.deploy a new standalone web application on JBoss: select inventory on JBoss resource, than create child>web application
2.redeploy the same war: go to content>new>upload new package (see newPackageScreenshot.png)
  
Actual results:
original file helloworld.war in jboss-eap-5.1/jboss-as/server/default/deploy was renamed to helloworld.war-6204127540627021664
Package name shown on portal is correct (see historyScreenshot.png and deployedScreenshot.png)

Expected results:
Only version is updated

Comment 2 Stefan Negrea 2012-05-23 15:38:26 UTC
The AS5 deployer uses the file name as-is to determine the name of the app to be updated/deployed. Instead of adding the random UUID to the archive to be deployed, add the random UUID to a temp folder name and then download content there (leaving the file name unchanged). This issue has been fixed for both farmed and non-farmed deployments.

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 3 John Sanda 2012-06-05 14:37:12 UTC
Moving to ON_QA since this is included in the CR2 build.

Comment 4 Filip Brychta 2012-06-07 10:44:45 UTC
Verified on 3.1.0.CR3 for both farmed and non-farmed deployments. For farmed deployment also verified that update doesn't result in non-farmed deployment (Bug 646631)