Description of problem: Problem Description ####################### - CFME 4.2 - Trying to rename the tenant in our global CloudForms region from "My Company" to "Kaiser Permanente" - When trying to use "Kaiser Permanente" in Tenant name, CFME is returning this error msg: "Error when adding a new tenant: Validation failed: Name should be unique per parent" - But when trying to use "Kaiser Permanente Global", it works. - Assuming that the uniqueness check for the name doesn't filter by region, and sees that the tenant name returning error in the global region is already used by a local region. Action Taken ####################### Collected tenant info from SQL query(select * from tenants;) => Confirmed that there are 3 local regional tenants with "Kaiser Permanente" and 1 global tenant with "Kaiser Permanente Global" which originated from "My Company" Checked collected logs from 3 UI nodes, found related err and change. <UI node 14> E, [2017-02-15T14:49:58.325164 #2478:16ece80] ERROR -- : MIQ(ops_controller-rbac_tenant_edit): Error when adding a new tenant: Validation failed: Name should be unique per parent <UI node 15> E, [2017-02-15T14:54:53.275167 #25438:ccc478] ERROR -- : MIQ(ops_controller-rbac_tenant_edit): Error when adding a new tenant: Validation failed: Name should be unique per parent I, [2017-02-15T15:04:42.603757 #30991:d3e76c] INFO -- Success: MIQ(OpsRbac.rbac_tenant_edit) userid: [admin] - [Kaiser Permanente Global] Record updated (name changed to Kaiser Permanente Global, description changed to Kaiser Permanente Global, region_number changed to , region_description changed to , allocated_memory changed to , allocated_vcpu changed to , allocated_storage changed to , provisioned_storage changed to , parent_name changed to , display_type changed to ) Request to Collaborator Version-Release number of selected component (if applicable): 5.7.0. How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Yoder, I just created a PR for this - https://github.com/ManageIQ/manageiq/pull/16506
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/f2d4533a79ce05c3ef751ec66c710a4b231910ee commit f2d4533a79ce05c3ef751ec66c710a4b231910ee Author: Gregg Tanzillo <gtanzill> AuthorDate: Mon Nov 20 15:58:25 2017 -0500 Commit: Gregg Tanzillo <gtanzill> CommitDate: Mon Nov 20 16:03:51 2017 -0500 Scope Tenant#name validation to the current region https://bugzilla.redhat.com/show_bug.cgi?id=1422901 app/models/tenant.rb | 4 +++- spec/models/tenant_spec.rb | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)