Bug 1252930 - rhq:deployment unit should allow control tasks or execute serially
rhq:deployment unit should allow control tasks or execute serially
Status: CLOSED ERRATA
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6 (Show other bugs)
JON 3.3.0,JON 3.3.1,JON 3.3.2,JON 3.3.3
All All
high Severity high
: post-GA
: One-off release
Assigned To: Michael Burman
Filip Brychta
: Triaged
Depends On:
Blocks: 1228279 1261060 1261062 1261066 1273531 1289370 1302426 1319889 1319904 1319945
  Show dependency treegraph
 
Reported: 2015-08-12 10:23 EDT by Marc Shirley
Modified: 2016-03-22 18:27 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 14:00:11 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2147581 None None None 2016-02-02 12:14 EST

  None (edit)
Description Marc Shirley 2015-08-12 10:23:12 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

How reproducible:
Very

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:file> 
	<rhq:archive name="MQTestEar.ear">
		<rhq:handover action="deployment" />
	</rhq:archive>

Actual results:
Application deployment fails.

Expected results:
Application deployment succeeds.

Additional info:
Comment 5 Libor Zoubek 2015-09-29 08:31:14 EDT
Fixed in master

branch:  master
link:    https://github.com/rhq-project/rhq/commit/abe2aa7e1
time:    2015-09-29 14:27:06 +0200
commit:  abe2aa7e19dd9d10e001f95be6954e438cb25b68
author:  Libor Zoubek - lzoubek@redhat.com
message: Bug 1252930 - rhq:deployment unit should allow control tasks or execute
         serially

         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
         as7.plugin.handover-deployment.server-check-timeout.seconds
         system property
         (setting to 0 disables this check).


Changing component to EAP6 Plugin and resetting Target Release for inclusion in next plugin-pack release.
Comment 6 Larry O'Leary 2016-01-12 15:46:25 EST
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.
Comment 11 Michael Burman 2016-01-19 10:10:51 EST
In addition to the previous commit, add this one from master. Allows to define additional parameter for the handover deployment.

<rhq:handover action="deployment">
  <rhq:handover-param name="waitForServer" value="1000" />
</rhq:handover>

This overrides defaults and the previous 'new default' that is configurable by the user.

commit 508938d591a4614895316bbc07d22f1392a0ea11
Author: Michael Burman <miburman@redhat.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
Comment 12 Josejulio Martínez 2016-01-22 16:02:16 EST
In addition to the previous commits, add this one from master.

commit 97a874223ea2a3430cedea2a9b66cd67a22bf4df
Author: Josejulio Martínez <jmartine@redhat.com>
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.
Comment 16 Filip Brychta 2016-02-05 09:43:38 EST
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.
Comment 17 Larry O'Leary 2016-02-18 14:00:11 EST
This fix/change was released in Application Platform Management Plug-in Pack Update-02 for JBoss ON 3.3.

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