Bug 1380535 - ServiceTemplateProvisionTask not honoring provider zone
Summary: ServiceTemplateProvisionTask not honoring provider zone
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: Alex Newman
URL:
Whiteboard:
: 1313930 (view as bug list)
Depends On:
Blocks: 1391763 1391764
TreeView+ depends on / blocked
 
Reported: 2016-09-29 22:58 UTC by Brant Evans
Modified: 2018-01-19 21:23 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1391763 1391764 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:44:15 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brant Evans 2016-09-29 22:58:12 UTC
Description of problem:
When provisioning a VM from a Service Catalog Item (in this case ordering catalog item for an Azure Orchestration Template) the task that is generated from the ServiceTemplateProvisionRequest does not specify the zone of the provider that the provisioning will occur in.

This allows the task to be executed in any zone.


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

How reproducible:
Always

Steps to Reproduce:
1. Setup CloudForms with multiple zones and assign appliances to each zone.
2. Enable the automation role on appliances in multiple zones.
3. Create a Catalog Item to order a service based on an orchestration template
4. Order the Catalog Item
5. Check the automation.log of each appliance to determine which appliance the task was executed on.
6. Repeat steps 4 and 5 several times

Actual results:
The ServiceTemplateProvisionTask is executed on appliances outside of the zone that the provider is assigned to.


Expected results:
The ServiceTemplateProvisionTask is executed on appliances in the zone that the provider is assigned to.

Additional info:

Comment 2 Brant Evans 2016-09-29 23:00:50 UTC
I believe that the ServiceTemplateProvisionRequest should default the zone for the ServiceTemplateProvisionTask to the zone that the provider is assigned when sending the task to Automate.

There should also be a way to override the zone that is used when sending the ServiceTemplateProvisionTask to Automate.

Comment 3 Greg McCullough 2016-09-30 17:29:56 UTC
Bill - I think the missing part here is supplying the proper zone in miq_request_task.rb.  The logic checks if the source supports the "my_zone" method which would need to be added to ServiceTemplateOrchestration.  However, there may be a better way to resolve this, will need some research.

Comment 5 Bill Wei 2016-10-18 14:17:18 UTC
*** Bug 1313930 has been marked as a duplicate of this bug. ***

Comment 6 CFME Bot 2016-10-25 23:01:05 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/f928e88545292f33189cf1e11f7acb092ba67a3f

commit f928e88545292f33189cf1e11f7acb092ba67a3f
Author:     Bill Wei <bilwei>
AuthorDate: Wed Oct 12 14:40:28 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Wed Oct 12 15:12:25 2016 -0400

    Set zone when deliver a service template provision task
    
    Add ServiceTemplateOrchestration#my_zone to return zone from orchestration manager.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1380535

 app/models/service_template_orchestration.rb       |  4 ++
 app/models/service_template_provision_task.rb      |  3 +-
 spec/models/service_template_orchestration_spec.rb | 84 +++++++++++++---------
 .../models/service_template_provision_task_spec.rb |  7 +-
 4 files changed, 61 insertions(+), 37 deletions(-)

Comment 7 CFME Bot 2016-11-01 13:46:01 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/ae766800aef85f029dcb64ab92087b7ecd66b646

commit ae766800aef85f029dcb64ab92087b7ecd66b646
Author:     Greg McCullough <gmccullo>
AuthorDate: Tue Oct 25 18:57:03 2016 -0400
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Tue Nov 1 09:43:08 2016 -0400

    Merge pull request #11883 from bzwei/orchestration_zone
    
    Set zone when deliver a service template provision task
    (cherry picked from commit b31af139725839414a942607fe87a253624bdf91)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1380535

 app/models/service_template_orchestration.rb       |  4 ++
 app/models/service_template_provision_task.rb      |  3 +-
 spec/models/service_template_orchestration_spec.rb | 84 +++++++++++++---------
 .../models/service_template_provision_task_spec.rb |  7 +-
 4 files changed, 61 insertions(+), 37 deletions(-)


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