Bug 902347 - [RFE] Bundle deployed on the deploy directory "ClusterWebApp" will be removed (undeployed) when second bundle is deployed on the deploy directory "ClusterWebApp2"
Summary: [RFE] Bundle deployed on the deploy directory "ClusterWebApp" will be removed...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Content
Version: JON 3.1.2
Hardware: Unspecified
OS: Windows
high
urgent
Target Milestone: ER01
: JON 3.2.0
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 1005880 1012076 1012083
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-21 12:50 UTC by bkramer
Modified: 2018-11-30 20:06 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-02 20:34:23 UTC
Type: Feature Request
Embargoed:


Attachments (Terms of Use)
Test bundles (17.14 KB, application/empty)
2013-01-21 12:53 UTC, bkramer
no flags Details
bundle_dir.png (39.70 KB, image/png)
2013-10-01 10:59 UTC, Armine Hovsepyan
no flags Details
bundle_dir2.png (42.69 KB, image/png)
2013-10-01 11:28 UTC, Armine Hovsepyan
no flags Details

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.


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