Bug 1374060 - service template provision tasks failing in check provision method
Summary: service template provision tasks failing in check provision method
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.6.0
Hardware: All
OS: All
unspecified
urgent
Target Milestone: GA
: 5.7.0
Assignee: Bill Wei
QA Contact: Milan Falešník
URL:
Whiteboard: service:provision
Depends On:
Blocks: 1376520
TreeView+ depends on / blocked
 
Reported: 2016-09-07 20:30 UTC by Josh Carter
Modified: 2019-12-16 06:40 UTC (History)
4 users (show)

Fixed In Version: 5.7.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1376520 (view as bug list)
Environment:
Last Closed: 2017-01-11 20:01:24 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
hotfix attached (5.50 KB, application/x-tar)
2016-09-07 20:38 UTC, Bill Wei
no flags Details
new hotfix (9.00 KB, application/x-tar)
2016-09-09 19:11 UTC, Bill Wei
no flags Details
hotfix to address the problem shown in the screenshot (14.50 KB, application/x-tar)
2016-09-12 15:12 UTC, Bill Wei
no flags Details

Description Josh Carter 2016-09-07 20:30:55 UTC
Description of problem:

Azure service provision fails at times during the check provision method execution but the vm is successfully provisioned and displayed within the cloudforms inventory. 

[----] I, [2016-09-06T20:43:32.610853 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> <AEMethod [/ManageIQ/Cloud/Orchestration/Provisioning/StateMachines/Methods/check_provisioned]> Starting
[----] I, [2016-09-06T20:43:33.898134 #14168:e2e8e8]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> <AEMethod check_provisioned> Check orchestration deployed
[----] I, [2016-09-06T20:43:33.929030 #14168:e2e8e8]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> <AEMethod check_provisioned> Stack deployment finished. Status: error, reason: stack has not been deployed
[----] I, [2016-09-06T20:43:33.930082 #14168:e2e8e8]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> <AEMethod check_provisioned> Please examine stack resources for more details
[----] I, [2016-09-06T20:43:34.113845 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> <AEMethod [/ManageIQ/Cloud/Orchestration/Provisioning/StateMachines/Methods/check_provisioned]> Ending
[----] I, [2016-09-06T20:43:34.114001 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> Method exited with rc=MIQ_OK
[----] I, [2016-09-06T20:43:34.114270 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> Followed  Relationship [miqaedb:/Cloud/Orchestration/Provisioning/StateMachines/Methods/CheckProvisioned#create]
[----] I, [2016-09-06T20:43:34.114358 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> Processed  State=[checkprovisioned] with Result=[error]
[----] W, [2016-09-06T20:43:34.114433 #14168:e4b998]  WARN -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> Error in State=[checkprovisioned]
[----] I, [2016-09-06T20:43:34.114587 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> In State=[checkprovisioned], invoking [on_error] method=[update_serviceprovision_status(status => 'stack has not been deployed'
)]
[----] I, [2016-09-06T20:43:34.427340 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> Updated namespace [Cloud/Orchestration/Provisioning/StateMachines/Provision/update_serviceprovision_status  ManageIQ/Cloud/Orch
estration/Provisioning/StateMachines]
[----] I, [2016-09-06T20:43:34.449751 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> Invoking [inline] method [/ManageIQ/Cloud/Orchestration/Provisioning/StateMachines/Provision/update_serviceprovision_status] wi
th inputs [{"status"=>"stack has not been deployed"}]
[----] I, [2016-09-06T20:43:34.450418 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> <AEMethod [/ManageIQ/Cloud/Orchestration/Provisioning/StateMachines/Provision/update_serviceprovision_status]> Starting
[----] I, [2016-09-06T20:43:35.718541 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> <AEMethod [/ManageIQ/Cloud/Orchestration/Provisioning/StateMachines/Provision/update_serviceprovision_status]> Ending
[----] I, [2016-09-06T20:43:35.718752 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) <AutomationEngine> Method exited with rc=MIQ_OK
[----] E, [2016-09-06T20:43:35.719391 #14168:e4b998] ERROR -- : Q-task_id([service_template_provision_task_10000000000037]) MIQ(MiqAeEngine.deliver_block) Error delivering {"dialog_tenant_name"=>nil, "dialog_stack_name"=>"rhel7-03-stack", "dialog_resource_group"=>nil, "dialog_new_resource_group"=>"rg-rhel7-03", "dialog_deploy_mode"=>"Incremental", "dialog_param_virtualMachineName"=>"rhel7-03-vm", "dialog_param_adminUserName"=>"adminuser", "password::dialog_param_adminPassword"=>"v2:{PpDCL2OeBLfqwTllpMmpqA==}", "dialog_param_virtualMachineSize"=>"Standard_A1", "request"=>"clone_to_service"} for object [ServiceTemplateProvisionTask.10000000000037] with state [checkprovisioned] to Automate:
[----] I, [2016-09-06T20:43:35.719534 #14168:e4b998]  INFO -- : Q-task_id([service_template_provision_task_10000000000037]) MIQ(ServiceTemplateProvisionTask#after_ae_delivery) ae_result="error"


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Bill Wei 2016-09-07 20:38:33 UTC
Created attachment 1198831 [details]
hotfix attached

Please try the hotfix.

Comment 4 Bill Wei 2016-09-09 19:11:34 UTC
Created attachment 1199593 [details]
new hotfix

Please try this hotfix.
There is automate script change. So please reset.

Comment 8 Bill Wei 2016-09-12 15:12:06 UTC
Created attachment 1200238 [details]
hotfix to address the problem shown in the screenshot

The attached hotfix includes the changes made in previous hotfix. It prevents the error shown on the screenshot "Ancestry::AncestryException: No child ancestry for new record. Save record before performing tree operations".

Comment 12 CFME Bot 2016-09-19 19:46:01 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/efd8ed7bd06e620fe216505208715bc666e8d430

commit efd8ed7bd06e620fe216505208715bc666e8d430
Author:     Bill Wei <bilwei>
AuthorDate: Fri Sep 9 15:21:33 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Fri Sep 16 09:46:21 2016 -0400

    Do not relied on the stack in VMDB to query raw status.
    
    Stack information is now saved in the service's options field.
    Validate the stack has been added/updated in VMDB after the provider refresh.
    Add the stack as a service resource of the service at the post-provisioning stage.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1374060

 app/models/service_orchestration.rb                | 52 +++++++++++++++++-----
 .../Methods.class/__methods__/check_provisioned.rb |  5 ++-
 .../orchestration_check_provisioned_spec.rb        |  5 ++-
 3 files changed, 47 insertions(+), 15 deletions(-)

Comment 13 CFME Bot 2016-09-20 19:30:57 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/f8ec21429e32b13a274ada2ee698d68e90d0433d

commit f8ec21429e32b13a274ada2ee698d68e90d0433d
Author:     Bill Wei <bilwei>
AuthorDate: Fri Sep 9 15:21:33 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Tue Sep 20 14:43:06 2016 -0400

    Do not rely on the stack in VMDB to query raw status.
    
    Stack information is now saved in the service's options field.
    Validate the stack has been added/updated in VMDB after the provider refresh.
    Add the stack as a service resource of the service at the post-provisioning stage.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1374060

 app/models/service_orchestration.rb                | 51 +++++++++++++++++-----
 .../Methods.class/__methods__/check_provisioned.rb |  5 ++-
 .../orchestration_check_provisioned_spec.rb        |  5 ++-
 3 files changed, 46 insertions(+), 15 deletions(-)

Comment 14 Milan Falešník 2016-10-03 12:43:15 UTC
Checked in 5.7.0.3.

For more details, https://bugzilla.redhat.com/show_bug.cgi?id=1376520#c5 and https://bugzilla.redhat.com/show_bug.cgi?id=1376520#c6


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