Bug 689810

Summary: Inconsistent Error message attempting to add duplicate user
Product: Red Hat Enterprise Linux 6 Reporter: Jenny Severance <jgalipea>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1CC: benl, dpal, mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.1.0-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: Adding a duplicate user resulted in a generic error message. Consequence: The error message itself was not specific enough to tell you exactly what was wrong. Fix: Include the object type and primary key in the error message. In this case the fact that a user with login xyz already exists. Result: A more consistent, understandable error message is presented.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 18:21:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jenny Severance 2011-03-22 14:06:24 UTC
Description of problem:
I thought this bug was already logged but I can't find it.  Sorry if it is a duplicate.


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-add-003: Add Duplicate User
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [09:21:36] ::  Executing: ipa user-add --first=Superuser --last=crazylastnametoolong sup34
ipa: ERROR: This entry already exists
:: [09:21:38] ::  "ipa user-add --first=Superuser --last=crazylastnametoolong sup34" failed as expected.
:: [09:21:40] ::  ERROR: Message not as expected. GOT: ipa: ERROR: This entry already exists  EXP: ipa: ERROR: user with name sup34 already exists


Version-Release number of selected component (if applicable):
ipa-server-2.0.0-16.el6.x86_64

How reproducible:
alwayas

Steps to Reproduce:
1. add a new user
2. try to add the same user
3.
  
Actual results:


Expected results:
 ipa: ERROR: This entry already exists

Additional info:
ipa: ERROR: user with name sup34 already exists

Comment 2 Dmitri Pal 2011-03-22 14:16:00 UTC
https://fedorahosted.org/freeipa/ticket/1116

Comment 3 Rob Crittenden 2011-03-22 14:18:31 UTC
Do I understand correctly that you are requesting a LESS-specific error message?

This would revert the following bugs (from ticket https://fedorahosted.org/freeipa/ticket/530)

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

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

Or do you want less information only for users?

Comment 4 Jenny Severance 2011-03-22 14:28:28 UTC
sorry ... mixed that up ... no want the error message to be consistent with all the other  CLIs and report  "ipa: ERROR: user with name sup34 already exists"

Comment 5 Martin Kosek 2011-03-30 06:40:08 UTC
Fixed in 67a29028160e129c3cf486b6caa1333f0d237596.

Comment 8 Jenny Severance 2011-07-19 19:29:43 UTC
verified:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-add-003: Add Duplicate User
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [10:37:32] ::  Executing: ipa user-add --first=Superuser --last=crazylastnametoolong sup34
ipa: ERROR: user with name "sup34" already exists
:: [10:37:34] ::  "ipa user-add --first=Superuser --last=crazylastnametoolong sup34" failed as expected.
:: [10:37:35] ::  Error message as expected: ipa: ERROR: user with name sup34 already exists
:: [   PASS   ] :: Verify expected error message.
'102c97d5-1a91-423d-9aa8-36ce8265abf7'
ipa-user-cli-add-003 result: PASS


version:

ipa-server.x86_64 0:2.0.99-3.20110719T0529zgit824ec7e.el6

Comment 9 Rob Crittenden 2011-10-31 16:18:21 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Adding a duplicate user resulted in a generic error message.
Consequence: The error message itself was not specific enough to tell you exactly what was wrong.
Fix: Include the object type and primary key in the error message. In this case the fact that a user with login xyz already exists.
Result: A more consistent, understandable error message is presented.

Comment 10 errata-xmlrpc 2011-12-06 18:21:00 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.

http://rhn.redhat.com/errata/RHSA-2011-1533.html