Bug 189985

Summary: uniqueness plugin : constraint violation message not informative
Product: [Retired] 389 Reporter: Mikael <mikael.kermorgant>
Component: Server - PluginsAssignee: Nathan Kinder <nkinder>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: low Docs Contact:
Priority: medium    
Version: 7.1CC: amsharma, jgalipea, nkinder
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 16:32:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 576869, 639035    
Attachments:
Description Flags
Patch nkinder: review?, rmeggins: review+

Description Mikael 2006-04-26 14:31:43 UTC
Description of problem:

With the uniqueness plugin activated, creating a new entry violating the created
constraint generates a generic message.
It would be more user-friendly to give the name of the concerned attribute.

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


How reproducible:

Activate the uniqueness plugin for an attribute.
Create a new entry reusing the value of an existing entry.
Read the error message


Actual results:

Problem

An error occurred while contacting the LDAP server.
(Constraint violation - Another entry with the same attribute value already exists)

The server was unable to fulfill your request, because the request violates a
constraint. 

Expected results:

Problem

An error occurred while contacting the LDAP server.
(Constraint violation - Another entry with the same value for attribute
"name_of_attribute" already exists)

The server was unable to fulfill your request, because the request violates a
constraint on attribute "name_of_attribute".

Comment 2 Nathan Kinder 2010-10-28 20:09:17 UTC
Created attachment 456328 [details]
Patch

Comment 3 Nathan Kinder 2010-10-28 20:32:05 UTC
Pushed to master.  Thanks to Rich for his review!

Counting objects: 13, done.
Delta compression using 2 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 936 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   20833de..d46f51d  master -> master

Comment 4 Amita Sharma 2011-06-21 09:58:25 UTC
[root@testvm data]# ldapadd -x -h localhost -p 1389 -D "cn=Directory Manager" -w Secret123  << EOF
> dn: uid=tuser0,dc=example,dc=com
> cn: tuser0
> sn: tuser0
> givenname: tuser0
> objectclass: top
> objectclass: person
> objectclass: organizationalPerson
> objectclass: inetOrgPerson
> uid: tuser0
> mail: ams@example.com
> userpassword: amsamsams
> EOF
adding new entry "uid=tuser0,dc=example,dc=com"
ldap_add: Constraint violation (19)
	additional info: Another entry with the same attribute value already exists (attribute: "uid")