Bug 1635635

Summary: Validation failed: Description is not unique within region 1 Method:[block in method_missing]
Product: Red Hat CloudForms Management Engine Reporter: Niladri Roy <niroy>
Component: ProvidersAssignee: Scott Seago <sseago>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: medium Docs Contact:
Priority: high    
Version: 5.9.3CC: dmetzger, gblomqui, jfrey, jhardy, obarenbo, simaishi, slucidi, smallamp, sseago
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.22 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1643539 (view as bug list) Environment:
Last Closed: 2019-02-12 16:53:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1643539    

Description Niladri Roy 2018-10-03 12:28:54 UTC
Description of problem:
For OpenStack provider, below error is observed when trying to use the option "Sync Users from Cloud Provider"

[----] E, [2018-10-03T10:14:48.601110 #6234:102d108] ERROR -- : MIQ(MiqQueue#deliver) Message id: [1000000790365], Error: [Validation failed: Description is not unique within region 1]
[----] E, [2018-10-03T10:14:48.601352 #6234:102d108] ERROR -- : [ActiveRecord::RecordInvalid]: Validation failed: Description is not unique within region 1  Method:[block in method_missing]


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

How reproducible:
Everytime at Cu env

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Cu has two OSP providers added

Comment 3 Scott Seago 2018-10-10 19:47:50 UTC
PR posted here: https://github.com/ManageIQ/manageiq-providers-openstack/pull/373

Comment 4 CFME Bot 2018-10-22 13:22:02 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/master:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/f172d524e35f3fa3c5ddda75418122e064277ef0
commit f172d524e35f3fa3c5ddda75418122e064277ef0
Author:     Scott Seago <sseago>
AuthorDate: Wed Oct 10 15:33:41 2018 -0400
Commit:     Scott Seago <sseago>
CommitDate: Wed Oct 10 15:33:41 2018 -0400

    BZ 1635635 Avoid uniqueness constraint violations in sync_users

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

    Manual changes after prior sync could result in the auto-generated
    MiqGroup name/description duplicating existing values. If the auto-
    generated name results in a uniqueness constraint violation, use
    a timestamped name instead.

 app/models/manageiq/providers/openstack/identity_sync_mixin.rb | 18 +-
 1 file changed, 12 insertions(+), 6 deletions(-)

Comment 5 CFME Bot 2018-10-26 12:16:54 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/hammer:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/59905573afe00e0311eb681fd3fe0ee2ab0f6e21
commit 59905573afe00e0311eb681fd3fe0ee2ab0f6e21
Author:     Samuel Lucidi <mansam.edu>
AuthorDate: Mon Oct 22 09:17:51 2018 -0400
Commit:     Samuel Lucidi <mansam.edu>
CommitDate: Mon Oct 22 09:17:51 2018 -0400

    Merge pull request #373 from sseago/sync_users_unique_name

    BZ 1635635 Avoid uniqueness constraint violations in sync_users

    (cherry picked from commit d2eb365bff5b31c50b35d02cdc2775178840e37f)

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

 app/models/manageiq/providers/openstack/identity_sync_mixin.rb | 18 +-
 1 file changed, 12 insertions(+), 6 deletions(-)

Comment 7 Ido Ovadia 2018-11-22 12:33:01 UTC
Verified
========
5.10.0.24