Bug 189985 - uniqueness plugin : constraint violation message not informative
uniqueness plugin : constraint violation message not informative
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Server - Plugins (Show other bugs)
7.1
All Linux
medium Severity low
: ---
: ---
Assigned To: Nathan Kinder
Viktor Ashirov
:
Depends On:
Blocks: 389_1.2.7 639035
  Show dependency treegraph
 
Reported: 2006-04-26 10:31 EDT by Mikael
Modified: 2015-12-07 11:32 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:32:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch (3.72 KB, patch)
2010-10-28 16:09 EDT, Nathan Kinder
nkinder: review?
rmeggins: review+
Details | Diff

  None (edit)
Description Mikael 2006-04-26 10:31:43 EDT
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 16:09:17 EDT
Created attachment 456328 [details]
Patch
Comment 3 Nathan Kinder 2010-10-28 16:32:05 EDT
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 05:58:25 EDT
[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")

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