Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 627709

Summary: Traceback when trying to run pulp package info on a non existing repo.
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedKeywords: Triaged
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-02-17 16:51:57 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: 647488    

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