Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 609066 - Pulp cli throws error if repo is created with duplicate label : should display proper error message
Pulp cli throws error if repo is created with duplicate label : should displa...
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Retired
Component: z_other (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
:
Depends On:
Blocks: pulp-verified
  Show dependency treegraph
 
Reported: 2010-06-29 07:04 EDT by Shveta
Modified: 2011-08-16 10:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-16 10:02:49 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 Shveta 2010-06-29 07:04:46 EDT
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 01:31:08 EDT
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 10:02:49 EDT
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.