Bug 627709 - Traceback when trying to run pulp package info on a non existing repo.
Summary: Traceback when trying to run pulp package info on a non existing repo.
Keywords:
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: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-08-26 17:52 UTC by Preethi Thomas
Modified: 2011-07-15 19:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-17 16:51:57 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2010-08-26 17:52:49 UTC
Description of problem:


[root@preethi ~]# pulp-admin -u admin -p admin package info --name=zsh --repoid=test
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py\", line 51, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py\", line 102, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py\", line 277, in get_package\n    return self.ok(api.get_package(id, name))\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/repo.py\", line 179, in get_package\n    packages = self.packages(id, name)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/repo.py\", line 166, in packages\n    repo = self._get_existing_repo(id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/repo.py\", line 85, in _get_existing_repo\n    raise PulpException(\"No Repo with id: %s found\" % id)\nPulpException: u'No Repo with id: test found'\n"

Comment 1 Pradeep Kilambi 2010-10-27 19:38:17 UTC
This should now report more gracefully suggesting

$ sudo pulp-admin  package info --name=zsh --repoid=i-dont-exist
Package [zsh] not found in repo [i-dont-exist]

We could make additional check to see if repo exists first.. but thats another call to the rest interface which seems unnecessary. This should suggest the user that he's trying to access a package that doesn't exist where  ever he's trying to look.

Comment 2 Jay Dobies 2010-10-29 16:58:26 UTC
Fixed in 0.77.

Comment 3 Jay Dobies 2010-11-03 19:35:28 UTC
Fixed in build 0.78.

Comment 4 Preethi Thomas 2010-11-08 13:05:44 UTC

I would prefer it say the repo does not exist. But moving to verified as per comment above.
still thinks this needs to be fixed if there is time.

[root@preethi ~]#  pulp-admin -u admin -p admin package info --name=zsh  --repoid=test
Package [zsh] not found in repo [test]

Comment 5 Preethi Thomas 2011-02-17 16:51:57 UTC
Closing with community release 

pulp-0.0.139-1.fc14.noarch


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