Bug 902347

Summary: [RFE] Bundle deployed on the deploy directory "ClusterWebApp" will be removed (undeployed) when second bundle is deployed on the deploy directory "ClusterWebApp2"
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: ContentAssignee: Lukas Krejci <lkrejci>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: high    
Version: JON 3.1.2CC: ahovsepy, hrupp, myarboro
Target Milestone: ER01Keywords: FutureFeature
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-02 20:34:23 UTC Type: Feature Request
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: 1005880, 1012076, 1012083    
Bug Blocks:    
Attachments:
Description Flags
Test bundles
none
bundle_dir.png
none
bundle_dir2.png none

Description bkramer 2013-01-21 12:50:34 UTC
Description of problem:
Bundle deployed on the deploy directory "ClusterWebApp" will be removed (undeployed) when second bundle is deployed on the deploy directory "ClusterWebApp2"

Version-Release number of selected component (if applicable):
JON 3.1.1

How reproducible:
Always

Steps to Reproduce:

1. EAP 6 standalone server installed and run on Windows;

2. Upload the ClusterWebApp.zip Bundle

3. Upload the ClusterWebApp2-1.2.zip Bundle

4. Deploy the ClusterWebApp Bundle to a destination on EAP instance, setting the Deploy Directory to be ClusterWebApp. 

5. Deploy the ClusterWebApp2 Bundle (v1.2) to a destination on the EAP instance setting the Deploy Directory to ClusterWebApp2. 
Actual results:

After ClusterWebApp2 bundle is deployed on ClusterWebApp2 folder, the first bundles ClusterWebApp.war gets deleted and the following is logged in the log file:

11:29:08,628 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ClusterWebApp.war"
11:29:09,907 INFO  [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011907: Register module: Module "deployment.ClusterWebApp.war:main" from Service Module Loader
11:29:10,036 WARN  [org.jboss.web] (MSC service thread 1-2) JBAS018204: Clustering not supported, falling back to non-clustered session manager
11:29:10,400 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /ClusterWebApp
11:29:10,547 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "ClusterWebApp.war"
11:30:55,835 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "ClusterWebApp2.war"
11:30:55,840 INFO  [org.jboss.as.osgi] (MSC service thread 1-2) JBAS011908: Unregister module: Module "deployment.ClusterWebApp.war:main" from Service Module Loader
11:30:55,960 INFO  [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011907: Register module: Module "deployment.ClusterWebApp2.war:main" from Service Module Loader
11:30:55,982 WARN  [org.jboss.web] (MSC service thread 1-2) JBAS018204: Clustering not supported, falling back to non-clustered session manager
11:30:56,028 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /ClusterWebApp2
11:30:56,128 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment ClusterWebApp.war in 296ms
11:30:56,174 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018558: Undeployed "ClusterWebApp.war"
11:30:56,176 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "ClusterWebApp2.war"


Expected results:
Both ClusterWebApp and ClusterWebApp2 should be properly deployed.


Additional info:
This only happens on Windows machine. If EAP standalone is running on Linux, deployment works fine. 

It seems that when we search and check if we already have "Deploy Directory" defined, we don't search for exact match so "ClusterWebApp2" will delete "ClusterWebApp". If we change "ClusterWebApp" into something different (for instance "MyWebApp"), then both bundles will stay deployed.

Comment 1 bkramer 2013-01-21 12:53:29 UTC
Created attachment 684260 [details]
Test bundles

Comment 2 bkramer 2013-01-25 16:39:59 UTC
Please discard the latest sentences from the comment #0 (https://bugzilla.redhat.com/show_bug.cgi?id=902347#c0) as this will fail in any case.

The deploy.xml in the  ClusterWebApp2-1.2.zip application is:

<?xml version="1.0"?>
<project name="ClusterWebApp-2" default="main" xmlns:rhq="antlib:org.rhq.bundle">
    <rhq:bundle name="ClusterWebApp-2" version="1.2" description="test ClusterWebApp2 bundle">
        <rhq:deployment-unit name="ClusterWebApp-2" manageRootDir="false">
            <rhq:file name="ClusterWebApp2.war" />
			<rhq:file name="test.properties" destinationDir="..\..\configuration\clwa2\"/>
        </rhq:deployment-unit>
    </rhq:bundle>
    <target name="main"/>
</project>

and this should work fine. However, when deploying on Windows, deployment directory is "C:\Users\bkramer\jboss\jboss_60\jboss-eap-6.0\standalone\deployments\ClusterWebApp2\..":

2013-01-25 09:58:20,952 INFO  [ResourceContainer.invoker.nonDaemon-4] (rhq.core.util.updater.Deployer)- Bundle [ClusterWebApp-2 v1.2]; Deployment [10552]: Will be managing the directory [C:\Users\bkramer\jboss\jboss_60\jboss-eap-6.0\standalone\deployments\ClusterWebApp2\..]; backing up and purging any obsolete content existing in there

so it points to the "C:\Users\bkramer\jboss\jboss_60\jboss-eap-6.0\standalone\deployments" directory - and whatever is already deployed there will be deleted.

If destinationDir is prefixed with ".\" in the deploy.xml of the ClusterWebApp2.war application, deployment works fine as it's deployment directory is:

C:\Users\bkramer\jboss\jboss_60\jboss-eap-6.0\standalone\deployments\ClusterWebApp2\.


Bundles should be properly deployed in both cases.

Comment 4 Heiko W. Rupp 2013-08-09 14:24:19 UTC
Lukas,
can you investigate this and either fix if it is a bug (difference Win* / Linux) or suggest a documentation improvement

Comment 6 Lukas Krejci 2013-09-10 13:05:46 UTC
Setting this to ON_QA as I could not reproduce in RHQ 4.9.0, see BZ 1005880 for details.

Comment 7 Armine Hovsepyan 2013-10-01 10:59:02 UTC
Created attachment 805839 [details]
bundle_dir.png

Comment 8 Armine Hovsepyan 2013-10-01 11:28:14 UTC
Created attachment 805845 [details]
bundle_dir2.png

Comment 9 Armine Hovsepyan 2013-10-01 11:28:54 UTC
verified
please get verification screen-shots attached.