Bug 609066 - Pulp cli throws error if repo is created with duplicate label : should display proper error message
Summary: Pulp cli throws error if repo is created with duplicate label : should displa...
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2010-06-29 11:04 UTC by Shveta
Modified: 2011-08-16 14:02 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-08-16 14:02:49 UTC


Attachments (Terms of Use)

Description Shveta 2010-06-29 11:04:46 UTC
Description of problem:
Pulp cli throws error if repo is created with duplicate label : should display proper error message

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.pulp repo create --label=TAKE3rhel-i386-server-5 --name=rhel-i386-server-5 --arch=i386 --feed=rhn:satellite.rhn.redhat.com/rhel-i386-server-5
2. repo is created successfully 
3. pulp repo create --label=TAKE3rhel-i386-server-5 --name=rhel-i386-server-5 --arch=i386 --feed=rhn:satellite.rhn.redhat.com/rhel-i386-server-5
4. Throws error
  
Actual results:


Expected results:


Additional info:

[root@shveta noarch]# pulp repo create --label=TAKE3rhel-i386-server-5 --name=rhel-i386-server-5 --arch=i386 --feed=rhn:satellite.rhn.redhat.com/rhel-i386-server-5
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/juicer/controllers/base.py\", line 49, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/juicer/controllers/repositories.py\", line 51, in PUT\n    sync_schedule=repo_data['sync_schedule'])\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/pulp/api/repo.py\", line 248, in create\n    self.insert(r)\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/pulp/api/base.py\", line 63, 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.repos.$_id_  dup key: { : \"TAKE3rhel-i386-server-5\" }\n"

Comment 2 Shveta 2010-07-09 05:31:08 UTC
root@shveta ~]# pulp repo create --label=TAKE3rhel-i386-server-5 --name=rhel-i386-server-5
"A repository with the id, TAKE3rhel-i386-server-5, already exists"
[root@shveta ~]# pulp repo create --label=rhel-i386-server5 --name=rhel-i386-server-5
"A repository with the id, rhel-i386-server5, already exists"
[root@shveta ~]# pulp repo create --label=rhel-i386-server5 --name=f12 --arch=i386 --feed=yum:http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/
"A repository with the id, rhel-i386-server5, already exists"
[root@shveta ~]# pulp repo create --label=f12_i386 --name=f12 --arch=i386 --feed=yum:http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/ Successfully created Repo [ f12_i386 ]
[root@shveta ~]# pulp repo create --label=f12_i386 --name=f12 --arch=i386 --feed=yum:http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/
"A repository with the id, f12_i386, already exists"

Comment 3 Preethi Thomas 2011-08-16 14:02:49 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.