Bug 1252930 - rhq:deployment unit should allow control tasks or execute serially
Summary: rhq:deployment unit should allow control tasks or execute serially
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.3.0,JON 3.3.1,JON 3.3.2,JON 3.3.3
Hardware: All
OS: All
high
high
Target Milestone: post-GA
: One-off release
Assignee: Michael Burman
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On:
Blocks: 1228279 1261060 1261062 1261066 1273531 1289370 1302426 1319889 1319904 1319945
TreeView+ depends on / blocked
 
Reported: 2015-08-12 14:23 UTC by Marc Shirley
Modified: 2019-09-12 08:45 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 19:00:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2147581 0 None None None 2016-02-02 17:14:51 UTC

Description Marc Shirley 2015-08-12 14:23:12 UTC
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 12:31:14 UTC
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
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 20:46:25 UTC
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 15:10:51 UTC
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>
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 21:02:16 UTC
In addition to the previous commits, add this one from master.

commit 97a874223ea2a3430cedea2a9b66cd67a22bf4df
Author: Josejulio Martínez <jmartine>
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 14:43:38 UTC
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 19:00:11 UTC
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.