Bug 1212022

Summary: unable to deploy package from repository if type is not File:Deployment/DomainDeployment
Product: [JBoss] JBoss Operations Network Reporter: Armine Hovsepyan <ahovsepy>
Component: ProvisioningAssignee: Libor Zoubek <lzoubek>
Status: CLOSED ERRATA QA Contact: Armine Hovsepyan <ahovsepy>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: ahovsepy, fbrychta, lzoubek, mfoley, miburman, theute
Target Milestone: ER01Keywords: Triaged
Target Release: JON 3.3.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-30 16:41:53 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:
Attachments:
Description Flags
video
none
server.log
none
deployUnsupported none

Description Armine Hovsepyan 2015-04-15 12:22:28 UTC
Created attachment 1014710 [details]
video

Description of problem:
unable to deploy package from repository if type != File:Deployment(DomainDeployment)

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

How reproducible:
always

Steps to Reproduce:
1. Install and start EAP6.x/AS7 server
2. Create child deployment helloworld-1.0.0.war 
3. create a repository (testrepo)
4. add packages with helloworld-1.0.1.war helloworld-1.0.2.war, helloworld-1.0.3.war with type File:War (WAR File [Web Application (WAR):JBossAS])
5. subscribe helloworld-1.0.0.war to testrepo
6. navigate to contnet -> new sub-tab of helloworld.war resource
7. select helloworld-1.0.1.war and click deploy

Actual results:
After step2. helloword.war with version 1.0.0 is visible in resources list

After step7. Exception in server.log
No current process is visible in GUI

Expected results:
After step7. 
No exception in server.log, GUI shows deployment inProgress in History sub-tab

Additional info:
server.log and video attached

Comment 1 Armine Hovsepyan 2015-04-15 12:23:54 UTC
Created attachment 1014712 [details]
server.log

Comment 3 Mike Foley 2015-04-16 12:53:17 UTC
setting to jon 3.3.2 cr1 for now

Comment 6 Libor Zoubek 2015-05-25 17:14:06 UTC
This is not a bug. If you have JBossAS7:Deployment resource the only package type you're allowed to upload is File. AS7 plugin does not know, how to deploy other package types, because they also come from other plugins. There was a bug, that we did not catch and properly show some meaningful message, which is fixed with bellow commit.

Steps to reproduce:
1. Install and start EAP6.x/AS7 server
2. Create child deployment helloworld-1.0.0.war 
3. create a repository (testrepo)
4. add packages with helloworld-1.0.1.war helloworld-1.0.2.war, helloworld-1.0.3.war with type File:War (WAR File [Web Application (WAR):JBossAS])
5. subscribe helloworld-1.0.0.war to testrepo
6. navigate to contnet -> new sub-tab of helloworld.war resource
7. select helloworld-1.0.1.war and click deploy

Actual results:
After step2. helloword.war with version 1.0.0 is visible in resources list

After step7. Exception in server.log
No current process is visible in GUI

Expected results:
After step7. 
UI shows error message, telling you, that you are deploying wrong package type.


branch:  master
link:    https://github.com/rhq-project/rhq/commit/151e96bbd
time:    2015-05-25 18:58:08 +0200
commit:  151e96bbd5713f12b923570bb57cc3ad372244c1
author:  Libor Zoubek - lzoubek
message: Bug 1212022 - unable to deploy package from repository if type is not 
         File:Deployment/DomainDeployment

         Now we show/throw error once user attempts to deploy
         packageType incompatible with resource type.


branch:  master
link:    https://github.com/rhq-project/rhq/commit/e7ec8a2a1
time:    2015-05-25 19:11:13 +0200
commit:  e7ec8a2a1349d693b177735e89663dfe3ec3bfb4
author:  Libor Zoubek - lzoubek
message: Bug 1212022 - unable to deploy package from repository if type is not 
         File:Deployment/DomainDeployment

         improve error message output

Comment 7 Michael Burman 2015-06-16 08:47:35 UTC
Cherry-picked to release/jon3.3.x:

commit d5b094bdc24277f10e5a20b906ad31dfac2b3079
Author: Libor Zoubek <lzoubek>
Date:   Mon May 25 19:11:13 2015 +0200

    Bug 1212022 - unable to deploy package from repository if type is not
    File:Deployment/DomainDeployment
    
    improve error message output
    
    (cherry picked from commit e7ec8a2a1349d693b177735e89663dfe3ec3bfb4)

commit 2aca49f665abd954d0ea7b35475f1ecd03e6ce58
Author: Libor Zoubek <lzoubek>
Date:   Mon May 25 18:54:58 2015 +0200

    Bug 1212022 - unable to deploy package from repository if type is not
    File:Deployment/DomainDeployment
    
    Now we show/throw error once user attempts to deploy packageType
    incompatible with resource type.
    
    (cherry picked from commit 151e96bbd5713f12b923570bb57cc3ad372244c1)

Comment 8 Simeon Pinder 2015-07-10 18:55:28 UTC
Available for test with 3.3.3 ER01 build: 
https://brewweb.devel.redhat.com/buildinfo?buildID=446732
 *Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of
 jon-server-3.3.0.GA-update-03.zip.

Comment 9 Armine Hovsepyan 2015-07-13 14:32:05 UTC
Created attachment 1051439 [details]
deployUnsupported

Comment 10 Armine Hovsepyan 2015-07-13 14:34:45 UTC
verified. red error message is visible if non supported file type is selected

Comment 12 errata-xmlrpc 2015-07-30 16:41:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1525.html