Bug 1119781 - runtime name provided for deployment child creation overrides application name and path
Summary: runtime name provided for deployment child creation overrides application nam...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR01
: JON 3.3.0
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: JON3-42
TreeView+ depends on / blocked
 
Reported: 2014-07-15 13:41 UTC by Armine Hovsepyan
Modified: 2015-09-03 00:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-11 14:02:48 UTC
Type: Bug


Attachments (Terms of Use)
testhello-conf (205.64 KB, image/png)
2014-07-15 13:41 UTC, Armine Hovsepyan
no flags Details
app_config (238.74 KB, image/png)
2014-07-15 13:43 UTC, Armine Hovsepyan
no flags Details
app-in-eap-console (75.65 KB, image/png)
2014-07-15 13:43 UTC, Armine Hovsepyan
no flags Details
testhello-in-eap-console (75.62 KB, image/png)
2014-07-15 13:44 UTC, Armine Hovsepyan
no flags Details
app-path (190.50 KB, image/png)
2014-07-15 13:44 UTC, Armine Hovsepyan
no flags Details
testhello-path (158.29 KB, image/png)
2014-07-15 13:45 UTC, Armine Hovsepyan
no flags Details
testhello-runtime-name (170.07 KB, image/png)
2014-07-15 13:50 UTC, Armine Hovsepyan
no flags Details
eap-runtime-name (81.69 KB, image/png)
2014-08-04 16:05 UTC, Armine Hovsepyan
no flags Details
runtime-name-gui (211.46 KB, image/png)
2014-08-04 16:06 UTC, Armine Hovsepyan
no flags Details

Description Armine Hovsepyan 2014-07-15 13:41:09 UTC
Created attachment 918160 [details]
testhello-conf

Description of problem:
runtime name provided for deployment child creation overrides application name and path 

Version-Release number of selected component (if applicable):
RHQ 4-12 master (not a regression)

How reproducible:
always
reproduced for EAP-6.0 and EAP-6.2.0

Precondition: JON is installed, EAP inventoried to JON

Steps to Reproduce:
1. Install an app  (helloworld-2.0.war) from EAP admin console and give a runtime name as helloworld-2.1.2.war
2. Run auto-discovery scan to get latest EAP app discovered 
3. Create child resource under EAP with Deployment type
4. Upload helloworld-2.1.war and give a runtime name - testhello.war (or anything)
5. Run auto-discovery to get helloworld-2.1.war discovered

Actual results:
After step2. helloworld.war is discovered, path in connection settings is helloworld-2.0.war, runtime name (in config) is helloworld-2.1.2.war as in admin console
After step5. testhello.war is discovered, path in connection settings is testhello.war, runtime name (in config) is testhello.war. Same in admin console


Expected results:
After step2. helloworld.war is discovered, path in connection settings is helloworld-2.0.war, runtime name (in config) is helloworld-2.1.2.war as in admin console

After step5. helloworld.war is discovered, path in connection settings is helloworld-2.1.war, runtime name (in config) is testhello.war and in admin console

Additional info:
In EAP admin console, runtime name *should* be ${war_name}-${additiona_data}.war
screen-shots attached

Comment 1 Armine Hovsepyan 2014-07-15 13:43:01 UTC
Created attachment 918161 [details]
app_config

Comment 2 Armine Hovsepyan 2014-07-15 13:43:37 UTC
Created attachment 918162 [details]
app-in-eap-console

Comment 3 Armine Hovsepyan 2014-07-15 13:44:31 UTC
Created attachment 918163 [details]
testhello-in-eap-console

Comment 4 Armine Hovsepyan 2014-07-15 13:44:57 UTC
Created attachment 918164 [details]
app-path

Comment 5 Armine Hovsepyan 2014-07-15 13:45:41 UTC
Created attachment 918165 [details]
testhello-path

Comment 6 Armine Hovsepyan 2014-07-15 13:50:02 UTC
Created attachment 918177 [details]
testhello-runtime-name

Comment 7 Jay Shaughnessy 2014-07-22 14:47:40 UTC
The runtime name specified in RHQ basically affects the deployment as if that were the name of the archive being deployed.  Given that fact, the results are as expected, the runtime name "testhello.war" is not a versioned name, and therefore is not treated as a versioned deployment.

The only question I have is whether we are treating the runtime name correctly when it is provided by the user. I'm not 100% clear how runtime name is supposed to be work with respect to the archive name.  We need more info from an EAP/AS7 plugin expert.  Asking for more info from Thomas...

Comment 8 Thomas Segismont 2014-07-23 09:33:51 UTC
Just checked, the problem is in org.rhq.modules.plugins.jbossas7.BaseComponent#runDeploymentMagicOnServer

Whether the user gave a runtime name or not, we create the deployment node with the runtime name:

Operation step1 = new Operation("add", "deployment", runtimeName);

Comment 9 Jay Shaughnessy 2014-07-24 13:26:20 UTC
Comment 8 is spot on by Thomas.  I made the change and testing looks good. The deployment is now versioned as expected and the resource configuration reflects the proper runtime name.

master commit 5ab4508f13815c5a88e53d49513786b1d981abad
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Thu Jul 24 09:17:45 2014 -0400

    Use the deploymentName as appropriate, the runtimeName should be an attribute
    on the deployment and can be the same on multiple deployments, the
    deploymentName must be unique among deployments.

    -- incidental: several logging auto-formatting changes.


release/jon3.3.x commit 0a4c817f23e9f47c8dcd5ee58f5386c0865e8eed
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Thu Jul 24 09:25:10 2014 -0400

    Cherry-pick of master 5ab4508f13815c5a88e53d49513786b1d981abad

Comment 10 Simeon Pinder 2014-07-31 15:52:02 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 11 Armine Hovsepyan 2014-08-04 16:05:38 UTC
Created attachment 923947 [details]
eap-runtime-name

Comment 12 Armine Hovsepyan 2014-08-04 16:06:12 UTC
Created attachment 923948 [details]
runtime-name-gui

Comment 13 Armine Hovsepyan 2014-08-04 16:06:53 UTC
verified
thank you


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