Bug 623578 - pulp user: able to create duplicate usernames w/ unique --name
Summary: pulp user: able to create duplicate usernames w/ unique --name
Status: CLOSED DUPLICATE of bug 620893
Alias: None
Product: Pulp
Classification: Retired
Component: z_other (Show other bugs)
(Show other bugs)
Version: unspecified
Hardware: All Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: wes hayutin
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-12 08:34 UTC by wes hayutin
Modified: 2015-03-23 01:10 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description wes hayutin 2010-08-12 08:34:00 UTC
[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 08:36:19 UTC
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 14:48:41 UTC

*** 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.