Bug 723969

Summary: Regression: Incorrect Error message returned attempting to add user with uid 0
Product: Red Hat Enterprise Linux 6 Reporter: Jenny Severance <jgalipea>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: unspecified Docs Contact:
Priority: low    
Version: 6.1CC: benl, 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:
Do not document
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 18:41:45 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-07-21 16:24:07 UTC
Description of problem:

The error message changed and doesn't make sense with the latest ipa server build:

Error message you to state "must" and now is "can"

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-add-014: uid 0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa user-add --first=uid0 --last=uid0 --uid=0 uid0
:: [   LOG    ] :: "ipa user-add --first=uid0 --last=uid0 --uid=0 uid0" failed as expected.
:: [   LOG    ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'uid': can be at least 1  EXP: ipa: ERROR: invalid 'uid': must be at least 1
:: [   FAIL   ] :: Verify expected error message. (Expected 0, got 1)
:: [   LOG    ] :: Duration: 5s
:: [   LOG    ] :: Assertions: 0 good, 1 bad
:: [   FAIL   ] :: RESULT: ipa-user-cli-add-014: uid 0


Version-Release number of selected component (if applicable):
ipa-server.i686 0:2.0.99-3.20110721T0516zgit8e8ad51.el6

How reproducible:


Steps to Reproduce:
1. ipa user-add --first=uid0 --last=uid0 --uid=0 uid0
2.
3.
  
Actual results:
ipa: ERROR: invalid 'uid': can be at least 1

Expected results:
ipa: ERROR: invalid 'uid': must be at least 1

Additional info:

Comment 1 Jenny Severance 2011-07-21 16:34:46 UTC
same with modifying user ...

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-mod-045: uid 0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa user-mod --setattr uidNumber=0 sup34
:: [   LOG    ] :: "ipa user-mod --setattr uidNumber=0 sup34" failed as expected.
:: [   LOG    ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'uid': can be at least 1  EXP: ipa: ERROR: invalid 'uid': must be at least 1
:: [   FAIL   ] :: Verify expected error message for --setattr. (Expected 0, got 1)
:: [   LOG    ] :: Executing: ipa user-mod --uid=0 sup34
:: [   LOG    ] :: "ipa user-mod --uid=0 sup34" failed as expected.
:: [   LOG    ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'uid': can be at least 1  EXP: ipa: ERROR: invalid 'uid': must be at least 1
:: [   FAIL   ] :: Verify expected error message for --uid. (Expected 0, got 1)
:: [   LOG    ] :: Duration: 7s
:: [   LOG    ] :: Assertions: 0 good, 2 bad
:: [   FAIL   ] :: RESULT: ipa-user-cli-mod-045: uid 0

Comment 2 Rob Crittenden 2011-07-21 18:54:44 UTC
Changing a message is now a regression?

In any case with negative numbers the error message was even more unreadable.

If you pass in > MININ the error message was:

invalid 'attribute': must be at least -2147483648

can makes much more sense in this case IMHO.

That seemed a bit odd so I changed the wording to can. It is trivial to change back as long as we come to an agreement. Maybe Deon should referee.

Comment 3 Jenny Severance 2011-07-21 20:28:14 UTC
I didn't set the Regression key word because it is so minor.  But yeah, "must" just seems more appropriate.

Comment 4 Rob Crittenden 2011-07-26 21:00:37 UTC
master: 87821f2049fb6f630c27e08d9939205bc87513e2

ipa-2-0: 2ee6295b48eb73299ec416d637ad3d6774b088a9

Comment 8 Jenny Severance 2011-10-05 20:55:49 UTC
verified :

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-add-014: uid 0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa user-add --first=uid0 --last=uid0 --uid=0 uid0
:: [   LOG    ] :: "ipa user-add --first=uid0 --last=uid0 --uid=0 uid0" failed as expected.
:: [   LOG    ] :: Error message as expected: ipa: ERROR: invalid 'uid': must be at least 1
:: [   PASS   ] :: Verify expected error message.
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 1 good, 0 bad
:: [   PASS   ] :: RESULT: ipa-user-cli-add-014: uid 0


version :
ipa-server-2.1.1-4.el6.x86_64

Comment 9 Rob Crittenden 2011-10-31 21:08:15 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:
Do not document

Comment 10 errata-xmlrpc 2011-12-06 18:41:45 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