Bug 1233944 - Automate Services Provisioning Issue - Conflict between statemachine completion and task rollup completion.
Summary: Automate Services Provisioning Issue - Conflict between statemachine completi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.5.0
Assignee: Tina Fitzgerald
QA Contact: Pete Savage
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-19 19:01 UTC by Tina Fitzgerald
Modified: 2015-12-08 13:14 UTC (History)
4 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:14:40 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Tina Fitzgerald 2015-06-19 19:01:13 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Tina Fitzgerald 2015-06-19 19:16:48 UTC
This issue is related to the issue reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=1128890
The fix for this issue relies on the above fix. 

The problem is that Service provisioning was not waiting for all of the child provisioning to finish. 

To validate the issue, you should setup a service bundle containing at least 2 service items.

Edit the catalog bundle to specify the bundle entrypoint:  
/Service/Provisioning/StateMachines/ServiceProvision_Template/CatalogBundleInitialization

Edit the catalog item(s) to specify the item entrypoint: /Service/Provisioning/StateMachines/ServiceProvision_Template/CatalogItemInitialization

The following automate model changes are necessary, so you'll have to have a writable domain:

1. Create the automate method:  
/Service/Provisioning/StateMachines/Methods/sleep_delay

with the contents:
10.times { $evm.log('info', "************ sleep delay ***************") }

Create the instance:  
/Service/Provisioning/StateMachines/Methods/SleepDelay
execute value: sleep_delay

Edit the instance: /Service/Provisioning/StateMachines/ServiceProvision_Template/CatalogItemInitialization instance as follows:

post3 value:
/Service/Provisioning/StateMachines/Methods/SleepDelay


2. Create the automate method:  
/Service/Provisioning/StateMachines/Methods/bundle_post_processing

with the contents:
10.times { $evm.log('info', "************ bundle_post_processing ***************") }

Create the instance:  
/Service/Provisioning/StateMachines/Methods/BundlePostProcessing
execute value: bundle_post_processing

Edit the instance: /Service/Provisioning/StateMachines/ServiceProvision_Template/CatalogBundleInitialization instance as follows:

post3 value:
/Service/Provisioning/StateMachines/Methods/BundlePostProcessing

3. Provision the service and check the automation.log.  Prior to the bug fix referenced in the ticket, you would see the "bundle post processing" log messages prior to some/all of the "sleep_delay" log messages. With the bug fix, you should see 2 sets of "sleep_delay" log messages followed by the "bundle_post_processing" log messages.

Comment 3 Oleg Barenboim 2015-06-23 17:06:55 UTC
https://github.com/ManageIQ/manageiq/pull/3233

Comment 4 CFME Bot 2015-07-21 15:58:57 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8a8a42bafd8754ce431fd131b103995ca94ca70b

commit 8a8a42bafd8754ce431fd131b103995ca94ca70b
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Fri Jun 19 15:23:59 2015 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Tue Jul 21 10:01:10 2015 -0400

    Prevent task state being set to finished until the task is complete.
    
    Child task "finished" state was resulting in the parent task being
    "finished" if there was only one child. Set parent task to "provisioned"
    until the after_ae_delivery sets the parent task to finished.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1233944

 app/models/miq_request_task.rb | 5 +++++
 1 file changed, 5 insertions(+)

Comment 5 CFME Bot 2015-07-21 16:28:12 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8a8a42bafd8754ce431fd131b103995ca94ca70b

commit 8a8a42bafd8754ce431fd131b103995ca94ca70b
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Fri Jun 19 15:23:59 2015 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Tue Jul 21 10:01:10 2015 -0400

    Prevent task state being set to finished until the task is complete.
    
    Child task "finished" state was resulting in the parent task being
    "finished" if there was only one child. Set parent task to "provisioned"
    until the after_ae_delivery sets the parent task to finished.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1233944

 app/models/miq_request_task.rb | 5 +++++
 1 file changed, 5 insertions(+)

Comment 6 Pete Savage 2015-11-09 13:38:45 UTC
Verified in 5.5.0.9

Comment 8 errata-xmlrpc 2015-12-08 13:14:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


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