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:

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)?

(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

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.

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.

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.

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.

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.