Bug 623179 - Traceback when trying to create a user with the same username that is already existing
Summary: Traceback when trying to create a user with the same username that is already...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2010-08-11 14:29 UTC by Preethi Thomas
Modified: 2015-03-23 01:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:00:30 UTC
Embargoed:


Attachments (Terms of Use)

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.


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