Red Hat Bugzilla – Bug 1252930
rhq:deployment unit should allow control tasks or execute serially
Last modified: 2016-03-22 18:27:34 EDT
Description of problem:
With the introduction of the handover tasks in deployment-unit, there is now the possibility of a cli script taking long enough to execute that the archive is deployed before the script is complete. If the archive is dependent on said script, then the deployment will fail (for example, if the script is setting up datasources for the deployment).
Version-Release number of selected component (if applicable):
JBoss ON 3.3
Steps to Reproduce:
1. Deploy bundle utilizing handover tasks like in the below excerpt. The script should set up resources that the ear/war is dependent upon and needs to be slow performing enough to still be executing when the deployment starts.
<rhq:file name="mq_template.cli" replace="false">
<rhq:handover action="execute-script" failonerror="false" />
<rhq:handover action="deployment" />
Application deployment fails.
Application deployment succeeds.
Fixed in master
time: 2015-09-29 14:27:06 +0200
author: Libor Zoubek - firstname.lastname@example.org
message: Bug 1252930 - rhq:deployment unit should allow control tasks or execute
Fix AS7 plugin's handling bundle:handover action="deployment"
to ensure server is up before uploading new content. We check
for server response for
(by default) 120s, this timeout can be changed by setting up
(setting to 0 disables this check).
Changing component to EAP6 Plugin and resetting Target Release for inclusion in next plugin-pack release.
User suggests that the BundleHandoverRequest "deployment" action's timeout be exposed as a BundleHandoverRequest parameter. This will allow the timeout to be set/overridden in the recipe.
The default seems reasonable but it is important to note that even within EAP 6, many custom deployments may delay the start of some services for several minutes. Although this is not the normal scenario, it is common enough to warrant an easier method of overriding this per instance/bundle rather then generically.
Is this possible? The parameter must be optional and if not specified, the proper default is used.
In addition to the previous commit, add this one from master. Allows to define additional parameter for the handover deployment.
<rhq:handover-param name="waitForServer" value="1000" />
This overrides defaults and the previous 'new default' that is configurable by the user.
Author: Michael Burman <email@example.com>
Date: Tue Jan 19 17:08:30 2016 +0200
[BZ 1252930] Add handover-param to allow changing the configured timeout parameter for server reload
In addition to the previous commits, add this one from master.
Author: Josejulio Martínez <firstname.lastname@example.org>
Date: Fri Jan 22 12:36:53 2016 -0600
BZ-1252930 Changed Math.min to Math.max, so the wait time will be at least one second.
Verified on JON 3.3.5 with eap plugin pack update02
Verified that deployment does not fail earlier than defined in rhq:handover-param name="waitForServer" or default value (120s) when waitForServer is not set. Also verified that deployment is successfully finished when condition causing problems (e.g. server not yet started) are resolved.
This fix/change was released in Application Platform Management Plug-in Pack Update-02 for JBoss ON 3.3.