Bug 623578 - pulp user: able to create duplicate usernames w/ unique --name
pulp user: able to create duplicate usernames w/ unique --name
Status: CLOSED DUPLICATE of bug 620893
Product: Pulp
Classification: Community
Component: z_other (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Sayli Karmarkar
wes hayutin
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-12 04:34 EDT by wes hayutin
Modified: 2015-03-22 21:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-17 10:48:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2010-08-12 04:34:00 EDT
[root@localhost tmp]# pulp -u test01 -p dog8code user list
+-------------------------------------------+
             Available Users                 
+-------------------------------------------+

Login :               	admin                        
Name  :                	None                     


Login :               	westest01                    
Name  :                	None                     


Login :               	westest01                    
Name  :                	None                     


Login :               	westest02                    
Name  :                	None                     

[root@localhost tmp]# pulp -u test01 -p dog8code user create --newusername=westest01 --newpassword=dog8code --name=westest01
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-

<snip>

self.__check_response_to_last_error(response)\n  File \"/usr/lib/python2.6/site-packages/pymongo/connection.py\", line 540, in __check_response_to_last_error\n    raise DuplicateKeyError(error[\"err\"])\nDuplicateKeyError: E11000 duplicate key error index: _database.users.$_id_  dup key: { : \"westest01\" }\n"


[root@localhost tmp]# pulp -u test01 -p dog8code user create --newusername=westest01 --newpassword=dog8code --name=westest04
 Successfully created User [ westest01 ] with name [ None ]
[root@localhost tmp]# 


Expected Results:

I would think that usernames should also have to be unique, not just names.
Not sure if its a bug or by design, opening to verify.
Comment 1 wes hayutin 2010-08-12 04:36:19 EDT
yup, I think its a bug. Running the delete command for username=westest01 will delete ALL the entries in the list.  It should be unique.


[root@localhost tmp]# pulp -u test01 -p dog8code user delete --deleteusername=westest01
 Successfully deleted User [ westest01 ] 
[root@localhost tmp]# pulp -u test01 -p dog8code user list
+-------------------------------------------+
             Available Users                 
+-------------------------------------------+

Login :               	admin                        
Name  :                	None                     


Login :               	westest02                    
Name  :                	None
Comment 2 Pradeep Kilambi 2010-08-17 10:48:41 EDT

*** This bug has been marked as a duplicate of bug 620893 ***

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