Bug 1414989 - check_provisioned Check orchestration deployed doesn't properly handle rollback_complete
Summary: check_provisioned Check orchestration deployed doesn't properly handle rollba...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Bill Wei
QA Contact: Shveta
URL:
Whiteboard: automate:stack
Depends On:
Blocks: 1421154 1421156
TreeView+ depends on / blocked
 
Reported: 2017-01-19 22:03 UTC by Jeffrey Cutter
Modified: 2017-06-12 16:09 UTC (History)
7 users (show)

Fixed In Version: 5.8.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1421154 1421156 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:09:34 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeffrey Cutter 2017-01-19 22:03:21 UTC
Description of problem:

For Cloud Orchestration Provisioning, check_provisioned does not properly handle 'rollback_complete' status and likely 'delete_complete', /failed$/, /canceled$/ statuses as well.  When rollback_complete is found the current logic falls through into a retry causing check_provisioned to continue to run until reaching the maximum number of attempts.  This prevents update_serviceprovision_status from handling the error.

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

5.6.3.3 though I checked the latest and check_provisioned script appears identical.

How reproducible:

Every time.

Steps to Reproduce:
1. Induce a cloud orchestration provision that will rollback.
2. Observe the log and note the task does not complete until check_provisioned reaches maximum attempts.

Additional info:

I had success fixing this by adding a return to the bottom of the when for rollback_complete et. al.

Current code:

  when 'rollback_complete', 'delete_complete', /failed$/, /canceled$/
    $evm.root['ae_result'] = 'error'
    $evm.root['ae_reason'] = reason
  else

Code which seems to fix the issue:

  when 'rollback_complete', 'delete_complete', /failed$/, /canceled$/
    $evm.root['ae_result'] = 'error'
    $evm.root['ae_reason'] = reason
    return
  else

diff of fixed current

$ diff check_provisioned*
30d29
<     return

Comment 3 CFME Bot 2017-02-03 16:35:57 UTC
New commit detected on ManageIQ/manageiq-content/master:
https://github.com/ManageIQ/manageiq-content/commit/6e7b0f0d80af7dbf2495a0c5db2a1cc90b2e2158

commit 6e7b0f0d80af7dbf2495a0c5db2a1cc90b2e2158
Author:     Bill Wei <bilwei>
AuthorDate: Mon Jan 30 16:21:29 2017 -0500
Commit:     Bill Wei <bilwei>
CommitDate: Fri Feb 3 11:21:20 2017 -0500

    Don't wait for refresh if stack no longer exists
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1414989

 .../Methods.class/__methods__/check_provisioned.rb             |  9 ++++++++-
 .../Methods.class/__methods__/check_provisioned_spec.rb        | 10 ++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

Comment 6 CFME Bot 2017-03-13 15:55:53 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/712496fba296d0d6a433de506fce4b2d4f81d244

commit 712496fba296d0d6a433de506fce4b2d4f81d244
Author:     Bill Wei <bilwei>
AuthorDate: Thu Mar 2 16:25:28 2017 -0500
Commit:     Bill Wei <bilwei>
CommitDate: Mon Mar 13 10:25:01 2017 -0400

    Don't wait for refresh if stack no longer exists
    
    Ported from https://github.com/ManageIQ/manageiq-content/pull/29
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1414989

 .../Methods.class/__methods__/check_provisioned.rb           |  9 ++++++++-
 .../orchestration_check_provisioned_spec.rb                  | 12 ++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

Comment 7 Shveta 2017-04-28 22:37:20 UTC
Fixed .
Verified in 5.8.0.12-rc1.20170425180304_4f35996


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