Bug 623179

Summary: Traceback when trying to create a user with the same username that is already existing
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: cperry, pkilambi, skarmark, whayutin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 14:00:30 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:
Bug Depends On:    
Bug Blocks: 641987    

Description Preethi Thomas 2010-08-11 14:29:55 UTC
Description of problem:


[root@preethi pulp]# pulp -u admin -p admin user list
+-------------------------------------------+
             Available Users                 
+-------------------------------------------+

Login :               	admin                        
Name  :                	None                     


Login :               	preethi                      
Name  :                	None                     

[root@preethi pulp]# pulp -u admin -p admin user create --newusername=preethi --newpassword=redhat1 --name=test


"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/users.py\", line 50, in PUT\n    user_data['name'])\n  File \"/usr/lib/python2.6/site-packages/pulp/auditing.py\", line 191, in _audit\n    result = method(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/api/user.py\", line 56, in create\n    self.insert(user)\n  File \"/usr/lib/python2.6/site-packages/pulp/api/base.py\", line 71, in insert\n    self.objectdb.insert(object, check_keys=check_keys, safe=True)\n  File \"/usr/lib64/python2.6/site-packages/pymongo/collection.py\", line 245, in insert\n    message.insert(self.__full_name, docs, check_keys, safe), safe)\n  File \"/usr/lib64/python2.6/site-packages/pymongo/connection.py\", line 570, in _send_message\n    return self.__check_response_to_last_error(response)\n  File \"/usr/lib64/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: { : \"test\" }\n"
[root@preethi pulp]#

Comment 1 Sayli Karmarkar 2010-09-29 16:00:21 UTC
$ sudo pulp-admin -u admin -p **** user create  --newusername="sayli" --newpassword="****"  --name="Sayli K"
 Successfully created User [ sayli ] with name [ Sayli K ]

$ sudo pulp-admin -u admin -p **** user create  --newusername="sayli" --newpassword="****"  --name="Sayli Karmarkar"
"A user with the login, sayli, already exists"

Comment 2 Preethi Thomas 2010-10-01 18:24:13 UTC
verified

[root@preethi ~]# pulp-admin user create --newusername=test-user1 --newpassword=redhat
 Successfully created User [ test-user1 ] with name [  ]
[root@preethi ~]# pulp-admin user create --newusername=test-user1 --newpassword=redhat
"A user with the login, test-user1, already exists"

Comment 3 Preethi Thomas 2011-08-16 14:00:30 UTC
Closing with Community Release 15

pulp-0.0.223-4.