Bug 1276405 - UI should not allow duplicate providers to be added
Summary: UI should not allow duplicate providers to be added
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.5.0
Assignee: Lucy Fu
QA Contact: Pavol Kotvan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-29 15:49 UTC by Pavol Kotvan
Modified: 2015-12-08 13:42 UTC (History)
7 users (show)

Fixed In Version: 5.5.0.12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:42:14 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot - warning that provider has been added already (11.91 KB, image/png)
2015-11-30 09:52 UTC, Pavol Kotvan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Pavol Kotvan 2015-10-29 15:49:30 UTC
Description of problem:
With multiple tenants configured, each tenant has ability to add the same provider. Super admin then can see the same provider multiple times. Number of hosts per provider is changing over time in the providers' quadicons.
Please see BZ#1273392 for more details and screenshots. 

Version-Release number of selected component (if applicable):
5.5.0.5-beta1.1.20151007163855_ed40d96

How reproducible:
always


Steps to Reproduce:
Please check BZ#1273392 for steps how to reproduce it.

Actual results:


Expected results:
UI should not allow duplicate providers to be added.

Additional info:

Comment 2 Greg McCullough 2015-11-17 18:10:12 UTC
Brad - Currently the provider validation limits scope to the current tenant.  Since we do not support adding the same provider twice in any condition we can expand the validation to check any provider.  The caveat being that the second tenant to add the provider will not be able to see that the provider already exists in another tenant before trying to add and getting an error.  In my opinion this is still better than allowing the provider to be added twice which causes many other issues.

Comment 3 bascar 2015-11-17 21:09:42 UTC
Yes, please prevent adding another of the same provider. It is fine to throw an error to the person adding the provider that it is already added elsewhere in the system and to sync up with an admin to help rectify.

Comment 4 Greg McCullough 2015-11-17 21:32:26 UTC
Lucy - Please update the EMS validation for hostname so that uniqueness is not scoped to the tenant.

Comment 6 CFME Bot 2015-11-18 19:00:20 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/83e2f17f9221196b27efae3148ce801bdfb3385b

commit 83e2f17f9221196b27efae3148ce801bdfb3385b
Author:     Lucy Fu <lufu>
AuthorDate: Wed Nov 18 12:16:57 2015 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Wed Nov 18 12:18:34 2015 -0500

    Update the EMS validation for hostname so that uniqueness is not scoped to the tenant.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1276405

 app/models/ext_management_system.rb       | 2 +-
 spec/models/ext_management_system_spec.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comment 7 CFME Bot 2015-11-18 23:18:25 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1d0f5e9655987f0cf84d917155d285502a5bdff9

commit 1d0f5e9655987f0cf84d917155d285502a5bdff9
Author:     Lucy Fu <lufu>
AuthorDate: Wed Nov 18 12:16:57 2015 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Wed Nov 18 15:31:48 2015 -0500

    Update the EMS validation for hostname so that uniqueness is not scoped to the tenant.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1276405

 app/models/ext_management_system.rb       | 2 +-
 spec/models/ext_management_system_spec.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comment 8 CFME Bot 2015-11-18 23:18:32 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=cbcc3b1ea49ef165126148c3f2075d67a7bcb41f

commit cbcc3b1ea49ef165126148c3f2075d67a7bcb41f
Merge: 706befc 1d0f5e9
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Nov 18 17:28:38 2015 -0500
Commit:     Greg McCullough <gmccullo>
CommitDate: Wed Nov 18 17:28:38 2015 -0500

    Merge branch '5.5.z-provider_scope_1276405' into '5.5.z'
    
    Update the EMS validation for hostname so that uniqueness is not scoped to the tenant.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1276405
    
    Original is [here](https://github.com/ManageIQ/manageiq/pull/5497).
    Fixed a conflict in the spec.
    
    
    See merge request !499

 app/models/ext_management_system.rb       | 2 +-
 spec/models/ext_management_system_spec.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comment 9 Pavol Kotvan 2015-11-30 09:52:39 UTC
Created attachment 1100413 [details]
Screenshot - warning that provider has been added already

Comment 10 Pavol Kotvan 2015-11-30 09:54:51 UTC
Verified on 5.5.0.12-rc2.20151124135609_653c0d4 appliance. Warning message is thrown when provider exists in DB already.

Comment 12 errata-xmlrpc 2015-12-08 13:42:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


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