Bug 1642594 - Orchestration catalog items cannot be submitted because of tenant error
Summary: Orchestration catalog items cannot be submitted because of tenant error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Bill Wei
QA Contact: Shveta
Red Hat CloudForms Documentation
URL:
Whiteboard:
: 1643289 (view as bug list)
Depends On:
Blocks: 1651391
TreeView+ depends on / blocked
 
Reported: 2018-10-24 18:25 UTC by Shveta
Modified: 2019-02-12 16:52 UTC (History)
13 users (show)

Fixed In Version: 5.10.0.25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1651391 (view as bug list)
Environment:
Last Closed: 2019-02-12 16:52:25 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)
tenant required (110.81 KB, image/png)
2018-10-24 18:25 UTC, Shveta
no flags Details

Description Shveta 2018-10-24 18:25:03 UTC
Created attachment 1497143 [details]
tenant required

Description of problem:


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

How reproducible:


Steps to Reproduce:
1. Add ec2 provider .
2. Create an orchestration catalog item for ec2.
3. fill necessary fields.Order catalog item 

Actual results:
Error for tenant is shown as in attached screenshot.
Tenant is already filled .
Expected results:


Additional info:
5.10.0.20.20181016163900_fe677b4

Comment 2 William Fitzgerald 2018-10-25 14:23:10 UTC
Same problem with Azure as a provider.   I talked with Harpreet awhile ago about this and:

UI only controls the name of the new dialog, rest of the dialog creation is being done by backend 

I think lines of interest in model code are:
https://github.com/ManageIQ/manageiq/blob/master/app/models/orchestration_template.rb#L93

and 

https://github.com/ManageIQ/manageiq/blob/master/app/models/orchestration_template.rb#L106


I talked with Bill Wei and there should be a 'default' tenant available to select. 

Hope this helps ...

Billy

Comment 3 Shveta 2018-10-25 16:07:11 UTC
It is there and selected . The order still complains about tenant field.

Comment 5 Shveta 2018-10-25 20:05:33 UTC
Appliance : https://10.8.196.220
Order catalog item

Comment 7 Greg McCullough 2018-10-31 11:54:01 UTC
*** Bug 1643289 has been marked as a duplicate of this bug. ***

Comment 8 Tina Fitzgerald 2018-10-31 19:04:30 UTC
Status update:

The /Cloud/Orchestration/Operations/Methods/Available_Tenants Automate method populates the Orchestration Service dialog tenant drop down list. 

https://github.com/ManageIQ/manageiq-content/blob/master/content/automate/ManageIQ/Cloud/Orchestration/Operations/Me
thods.class/__methods__/available_tenants.rb

The method attempts to get the cloud tenant list by the following:

 av_tenants = service.try(:orchestration_manager).try(:cloud_tenants)

The method unconditionally sets the default for the dropdown as follows:

              tenant_list = { nil => "<default>" } 

Azure and AWS do not support cloud tenants, so the dropdown will only contain the default value above. 

In versions 5.9 and above:
The dialog box will be greyed out since the key is nil. The error occurs as a result. 

The method "worked" in version 5.8. 

Since the dialog is auto-generated, there is an existing enhancement request to not create the dialog element for those providers. 

Still working on a solution and will update the ticket accordingly.

Comment 10 drew uhlmann 2018-11-08 14:48:20 UTC
Working on it now, it's looking like Tina's idea that the difference is a nil key vs. a "" key is correct.

Comment 18 CFME Bot 2018-11-19 14:56:29 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/b2c6ef6388e530200c070905c78a52186ccb2557
commit b2c6ef6388e530200c070905c78a52186ccb2557
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Wed Nov 14 15:45:13 2018 -0500
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Wed Nov 14 15:45:13 2018 -0500

    Remove tenant selection from base deployment options

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 app/models/orchestration_template.rb | 16 +-
 spec/models/orchestration_template_spec.rb | 3 +-
 2 files changed, 2 insertions(+), 17 deletions(-)

Comment 19 CFME Bot 2018-11-19 16:11:56 UTC
New commit detected on ManageIQ/manageiq-providers-azure/master:

https://github.com/ManageIQ/manageiq-providers-azure/commit/aa936b5bb4442b60ba9c612f2af247a741b3b4d3
commit aa936b5bb4442b60ba9c612f2af247a741b3b4d3
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Wed Nov 14 15:41:01 2018 -0500
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Wed Nov 14 15:41:01 2018 -0500

    Service dialog for orchestration template no longer contains tenant selection

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 spec/models/manageiq/providers/azure/cloud_manager/orchestration_template_spec.rb | 9 +-
 1 file changed, 4 insertions(+), 5 deletions(-)

Comment 20 CFME Bot 2018-11-19 16:56:18 UTC
New commit detected on ManageIQ/manageiq-providers-amazon/master:

https://github.com/ManageIQ/manageiq-providers-amazon/commit/6fc6cfbae01e2588387c28024f3b0c881f5f0bb1
commit 6fc6cfbae01e2588387c28024f3b0c881f5f0bb1
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Wed Nov 14 15:39:38 2018 -0500
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Wed Nov 14 15:39:38 2018 -0500

    Service dialog for orchestration template no longer contains tenant selection

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 spec/models/dialog/orchestration_template_amazon_service_dialog_spec.rb | 22 +-
 spec/models/manageiq/providers/amazon/cloud_manager/orchestration_template_spec.rb | 19 +-
 2 files changed, 19 insertions(+), 22 deletions(-)

Comment 21 CFME Bot 2018-11-19 16:56:48 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/master:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/c6caceb4524db1ddf08d4a7935fc5fd0088c79a4
commit c6caceb4524db1ddf08d4a7935fc5fd0088c79a4
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Wed Nov 14 15:42:37 2018 -0500
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Wed Nov 14 15:42:37 2018 -0500

    Service dialog for orchestration template needs tenant selection

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 app/models/manageiq/providers/openstack/cloud_manager/orchestration_template.rb | 16 +-
 1 file changed, 15 insertions(+), 1 deletion(-)

Comment 22 CFME Bot 2018-11-19 17:55:41 UTC
New commit detected on ManageIQ/manageiq/hammer:

https://github.com/ManageIQ/manageiq/commit/d2fd65954b6539f7490ddfe1f43d1e171118094d
commit d2fd65954b6539f7490ddfe1f43d1e171118094d
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Mon Nov 19 09:53:19 2018 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Mon Nov 19 09:53:19 2018 -0500

    Merge pull request #18202 from bzwei/ot_no_tenant

    Remove tenant selection from base deployment options

    (cherry picked from commit 2ca01f1d815941ef47b34518a37cf4369ce9682b)

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 app/models/orchestration_template.rb | 16 +-
 spec/models/orchestration_template_spec.rb | 3 +-
 2 files changed, 2 insertions(+), 17 deletions(-)

Comment 23 CFME Bot 2018-11-19 17:56:36 UTC
New commit detected on ManageIQ/manageiq-providers-amazon/hammer:

https://github.com/ManageIQ/manageiq-providers-amazon/commit/19d4fe2b2d7ee13501558b4b67d00e2cb1c852ff
commit 19d4fe2b2d7ee13501558b4b67d00e2cb1c852ff
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Mon Nov 19 11:56:07 2018 -0500
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Mon Nov 19 11:56:07 2018 -0500

    Merge pull request #499 from bzwei/no_tenant

    Service dialog for orchestration template no longer contains tenant selection

    (cherry picked from commit 59c267d6fc76406fba0066eee7ee574456414693)

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 spec/models/dialog/orchestration_template_amazon_service_dialog_spec.rb | 22 +-
 spec/models/manageiq/providers/amazon/cloud_manager/orchestration_template_spec.rb | 19 +-
 2 files changed, 19 insertions(+), 22 deletions(-)

Comment 24 CFME Bot 2018-11-19 17:57:08 UTC
New commit detected on ManageIQ/manageiq-providers-azure/hammer:

https://github.com/ManageIQ/manageiq-providers-azure/commit/da0755a30821314c72b1a2fbdb776adef83516b1
commit da0755a30821314c72b1a2fbdb776adef83516b1
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Mon Nov 19 11:08:40 2018 -0500
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Mon Nov 19 11:08:40 2018 -0500

    Merge pull request #306 from bzwei/no_tenant

    Service dialog for orchestration template no longer contains tenant selection

    (cherry picked from commit c1f7dd6e3fd366788c122e1ca09be20a6d352e4f)

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 spec/models/manageiq/providers/azure/cloud_manager/orchestration_template_spec.rb | 9 +-
 1 file changed, 4 insertions(+), 5 deletions(-)

Comment 25 CFME Bot 2018-11-19 17:57:38 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/hammer:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/35d17e55e80edb7224780c2d2843c124faed2412
commit 35d17e55e80edb7224780c2d2843c124faed2412
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Mon Nov 19 11:56:11 2018 -0500
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Mon Nov 19 11:56:11 2018 -0500

    Merge pull request #397 from bzwei/dialog_with_tenant

    Service dialog for orchestration template needs tenant selection

    (cherry picked from commit 4245c304f7e5db3465c394d2208198fcbe58cb87)

    https://bugzilla.redhat.com/show_bug.cgi?id=1642594

 app/models/manageiq/providers/openstack/cloud_manager/orchestration_template.rb | 16 +-
 1 file changed, 15 insertions(+), 1 deletion(-)

Comment 27 Shveta 2018-12-03 20:11:41 UTC
Fixed 
Verified in 5.10.0.27.20181128170555_43ed8cb


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