Bug 1370502

Summary: unable to use {nil => "<default>"} with self provisioning when selecting dialog_tenant_name
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: ProvisioningAssignee: Bill Wei <bilwei>
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: bilwei, cpelland, fdewaley, gmccullo, jhardy, jocarter, lkhomenk, obarenbo, simaishi, sshveta
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1371272 (view as bug list) Environment:
Last Closed: 2017-01-11 20:05:22 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: 1371272    
Attachments:
Description Flags
hotfix attachment none

Description Felix Dewaleyne 2016-08-26 13:44:10 UTC
Description of problem:
unable to use {nil => "<default>"} with self provisioning when selecting dialog_tenant_name

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

How reproducible:
all the time in customer environment

Steps to Reproduce:
1. log in as user with admin rights to the self_service interface
2. provision a cloud service using a dialog using {nil => "<default>"} for default value for the ddialog_tenant_name
3.

Actual results:
the provision request will not have a selection for the tenant name ; if the request is approved, the request will fail unable to validate the name of the tenant.

Expected results:
the request will have <default> for tenant name ; this happens when using the same dialog through the standard interface with the same user

Additional info:
the names of the tenants are populated by "/ ManageIQ / Cloud / Orchestration / Operations / Methods / Available_Tenants"

Comment 3 Bill Wei 2016-08-29 16:49:10 UTC
Please confirm whether my understanding of the problem is correct:

1. You saw and selected from both service UI and OpsUI <default> as the only choice for cloud tenant 

2. Ordering failed for service UI but succeeded for OpsUI.

Comment 5 Bill Wei 2016-08-29 21:44:26 UTC
Flex,
Please also identify that when you created the service template (catalog item), you have chosen type "Orchestration", not the type by provider such as "Azure", or "Amazon".

If your purpose is to do a VM provisioning not through orchestration, then do not use the dialog auto-generated from an orchestration template.

Comment 6 Felix Dewaleyne 2016-08-30 11:27:09 UTC
(In reply to Bill Wei from comment #3)
> Please confirm whether my understanding of the problem is correct:
> 
> 1. You saw and selected from both service UI and OpsUI <default> as the only
> choice for cloud tenant 
> 
> 2. Ordering failed for service UI but succeeded for OpsUI.

This is correct. Waiting on a confirmation from the customer

Comment 7 Felix Dewaleyne 2016-08-30 12:28:06 UTC
confirmed, the type used was the Orchestration one.

Comment 8 Bill Wei 2016-08-30 14:47:54 UTC
Asked Erik to continue to investigate.

Comment 9 Greg McCullough 2016-08-30 15:35:19 UTC
Felix - Can you specify what provider you are provisioning to and is there any logging or stack trace you can provide that would help identify where in the code the error is being raised?

Comment 11 Bill Wei 2016-08-30 21:11:02 UTC
Created attachment 1196081 [details]
hotfix attachment

Please try with this hotfix. It is still helpful to verify the problem is as identified if you can collect the log.

Comment 15 Bill Wei 2016-08-30 21:20:37 UTC
Assign to myself

Comment 17 CFME Bot 2016-08-31 00:45:44 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ac5e1b47131447a80b4299f263925d4b2f914b7c

commit ac5e1b47131447a80b4299f263925d4b2f914b7c
Author:     Bill Wei <bilwei>
AuthorDate: Tue Aug 30 17:02:21 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Tue Aug 30 17:02:21 2016 -0400

    Exclude cloud tenant option when it is an empty string
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1370502

 app/models/service_orchestration.rb       |  2 +-
 spec/models/service_orchestration_spec.rb | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

Comment 18 Felix Dewaleyne 2016-09-01 11:13:09 UTC
the customer confirms the hotfix is working. However one discrepency remains : if you use the self_service the tenant name is not displaying <default> like the main interface ; this can be seen when displaying of the request while it waits for approval.

should I open an UI bug for this or do we continue this here?

Comment 19 Bill Wei 2016-09-01 13:54:02 UTC
I think it is OK to leave the tenant name empty by not showing <default>, because empty means to use default tenant.

But if you think the user sees <default> at ordering time but sees empty at waiting for approval stage can cause confusing, then open an UI bug and assign to Erik.

Comment 20 Shveta 2016-10-11 18:50:52 UTC
Fixed .
Verified in 5.7.0.4-alpha1.20161005153002_cfc8a23