Bug 1400991

Summary: Central Admin - Impossible to distinguish Customize Templates
Product: Red Hat CloudForms Management Engine Reporter: Leo Khomenko <lkhomenk>
Component: ProvisioningAssignee: Lucy Fu <lufu>
Status: CLOSED CURRENTRELEASE QA Contact: Alex Newman <anewman>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: anewman, jhardy, lkhomenk, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ca:ui
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1414886 (view as bug list) Environment:
Last Closed: 2017-06-12 17:43:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1414886    
Attachments:
Description Flags
screen from Global Region appliance none

Description Leo Khomenko 2016-12-02 14:03:12 UTC
Created attachment 1227346 [details]
screen from Global Region appliance

Description of problem:During provision from the appliance with Global region templates from all regions are shown


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


How reproducible:100%


Steps to Reproduce:
1.Configure 2 VM to enable Central Administration(2 different Regions)
2.Provision a cloud instance 
3.Open Customize tab

Actual results:Duplicates are shown


Expected results:Some additional column to know the source of template


Additional info:can we use templates from Global Region to provision Instances on Remote one?

Comment 2 Greg McCullough 2016-12-02 15:03:14 UTC
Central admin delegates the work down to the lower region, so only customization_templates in the same region as the VM template are eligible to be used during provisioning.

Therefore the allowed_customization_templates method needs to limit the available templates based on the selected VM template.

This applies to both cloud and infra.

Lucy - I suggest we also try to identify other resource that might require the same change.  Many resource are already limited by the provider the VM template is associated with so those would be ok.  But there are likely other, for example PXE Servers, that need to be reviewed and possible updated.

Comment 5 CFME Bot 2017-01-18 19:16:37 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/6c9058abb5b8a8f6155208d11ae83d9ed88c0cb4

commit 6c9058abb5b8a8f6155208d11ae83d9ed88c0cb4
Author:     Lucy Fu <lufu>
AuthorDate: Wed Dec 7 13:19:41 2016 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Tue Dec 13 09:28:42 2016 -0500

    Check tags, Pxe server and cloud init customization templates in region during provisioning.
    
    Only check for resources in the same region where the selected template locates.
    https://bugzilla.redhat.com/show_bug.cgi?id=1400991

 app/models/miq_provision_virt_workflow.rb              | 10 ++++++++++
 app/models/miq_request_workflow.rb                     |  4 ++++
 app/models/mixins/cloud_init_template_mixin.rb         |  5 ++++-
 .../redhat/infra_manager/provision_workflow_spec.rb    | 18 ++++++++++++++++++
 4 files changed, 36 insertions(+), 1 deletion(-)

Comment 7 Leo Khomenko 2017-02-06 17:09:40 UTC
verified on 5.7.1.0