Bug 860665

Summary: Deploy To server Group operation do not have --force option
Product: [JBoss] JBoss Operations Network Reporter: Mohamed Hamza Ben Mansour <mbenmans>
Component: Plugin -- JBoss EAP 6Assignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: JON 3.1.0CC: fbrychta, loleary, myarboro
Target Milestone: ---   
Target Release: JON 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 861491 886167 (view as bug list) Environment:
Last Closed: 2013-09-11 11:00:42 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: 861491    
Bug Blocks: 886167    

Description Mohamed Hamza Ben Mansour 2012-09-26 12:41:22 UTC
Description of problem:
When deploying to a server group with Jboss-cli we have the option to force the deployment otherwise we obtain a duplicate ressource error message. 
Under JON we do not have this possibility so we have to  :
 * with the UI : delete the ressource under server-group deployment before re-promoting the domainDeployment
 * with jon-cli : I didn't find any

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Heiko W. Rupp 2012-11-09 16:01:41 UTC
So you are saying you want to upload e.g. a new version of the same file or a different one into DomainDeployments and then promote them to a server group?

Can you give an example with the help of the jboss-cli of what you are trying to do (including upload of the first version of the file)?

Comment 2 Mohamed Hamza Ben Mansour 2012-11-12 10:56:05 UTC
(In reply to comment #1)
> So you are saying you want to upload e.g. a new version of the same file or
> a different one into DomainDeployments and then promote them to a server
> group?
> 
> Can you give an example with the help of the jboss-cli of what you are
> trying to do (including upload of the first version of the file)?

Hi, 

when first deploy to a server-group you do something like : 

deploy myapp.ear --server-groups=mygroup

then if you want to redeploy your application you have to execute : 

 deploy myapp.ear --force

in order to force the update. Otherwise you obtain an error message saying that the deployment is already associated to the group.

Regards

Comment 3 Heiko W. Rupp 2012-11-14 17:17:16 UTC
Hello,
thanks for your feedback.

You can already do this ( if I understood you correctly), when you go to DomainDeployments and then to the deployment that you want to update.
There you go to the content tab , "new" subtab.

There you click on "upload new package", upload the new version of the app, if needed create a new repository at the bottom and click continue. On the next screen confirm. You should then see in the EAP log that the old version is undeployed and the new one deployed.

Comment 4 Larry O'Leary 2012-11-14 17:30:41 UTC
This does not address the issue of not being able to do this from the CLI. The --force option is part of the EAP API and is required to specify that the app is re-deployed to its existing groups. Not to be confused with simply replacing a domain deployment.

Comment 5 Heiko W. Rupp 2012-11-16 10:46:42 UTC
It (= --force) is not part of the EAP api. It is an option in one of the tools built around EAP.
If you do the above steps, you will see the re-deploy on the server group happening.

Comment 6 Larry O'Leary 2012-11-26 19:31:14 UTC
This still doesn't achieve the original request here. The original request is via the CLI, not the UI.

As for the UI approach, I agree. The content system is sufficient here. But I think the operation's name may result in confusion or overloading of the AS7 concept of "deploying to a group." The AS7 operation provides a --force argument for its "deploy to group" operation as described in comment 2. In our case though, I do not think the operation--we named "deploy to server-group"--is the same thing as the AS7 workflow "deploy to group." This just seems like an area of confusion that perhaps we need to clarify in some manner.

Comment 8 Heiko W. Rupp 2012-12-03 08:39:45 UTC
In the cli you can of course do the same

( from a mail to rhq-devel ) 


rhqadmin@localhost:7080$ var res = ProxyFactory.getResource(11534);

That has some content != test-simple2.war deployed.
When you run in cli 

This works:

  rhqadmin@localhost:7080$ res.updateBackingContent("/Users/hrupp/downloads/test-simple2.war","4");

This then fails (*)

 rhqadmin@localhost:7080$ res.updateBackingContent("/Users/hrupp/downloads/test-simple2.war","5");

This works:
 rhqadmin@localhost:7080$ res.updateBackingContent("/Users/hrupp/downloads/test-simple.war","5"); 


The mentioned failure happens when I try to upload the existing content again, but otherwise that works already.

Comment 9 Larry O'Leary 2012-12-04 18:18:00 UTC
Well, I think this highlights that it is broken. Additionally, bug 862011 seems to indicate that this doesn't work either.

Comment 10 Heiko W. Rupp 2012-12-11 16:40:08 UTC
release-branch e4203a2ac1 updates the display name + description to say 'Assign' instead of deploy to better describe what the operation does.

Comment 11 Simeon Pinder 2012-12-13 19:18:39 UTC
Moving to ON_QA as new build available to test with:
https://brewweb.devel.redhat.com/buildinfo?buildID=247371

Comment 12 Filip Brychta 2012-12-20 16:08:47 UTC
Verified on 3.1.2.ER5.
Works correctly for both the UI and CLI.
For UI follow Heiko's comment 3.
For CLI follow Heiko's comment 8. Even uploading the existing content again (that wasn't working in comment 8) works correctly on ER5. Content is redeployed.
When version is omitted, hash is used instead.

It is true that reassign (domain deployment->Operations->Assign to ServerGroup) the same deployment to some server group again fails, but that is not a correct way how to redeploy deployment on server group. This can be done as stated in Heiko's comment 3. So '--force' flag is unnecessary.