Bug 860665 - Deploy To server Group operation do not have --force option
Deploy To server Group operation do not have --force option
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6 (Show other bugs)
JON 3.1.0
Unspecified Unspecified
high Severity high
: ---
: JON 3.1.2
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On: 861491
Blocks: 886167
  Show dependency treegraph
 
Reported: 2012-09-26 08:41 EDT by Mohamed Hamza Ben Mansour
Modified: 2013-09-11 07:00 EDT (History)
3 users (show)

See Also:
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 07:00:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mohamed Hamza Ben Mansour 2012-09-26 08:41:22 EDT
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 11:01:41 EST
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 05:56:05 EST
(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 12:17:16 EST
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 12:30:41 EST
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 05:46:42 EST
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 14:31:14 EST
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 03:39:45 EST
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 13:18:00 EST
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 11:40:08 EST
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 14:18:39 EST
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 11:08:47 EST
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.

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