Project

Profile

Help

Issue #565

closed

Server-side traceback when publishing with a non-existing distributor id

Added by rbarlow about 9 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.4.0
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

Description

Description of problem:
If an API user queues a publish[0] with a distributor-id that doesn't exist, a traceback is logged to syslog.

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

How reproducible:
Every time.

Steps to Reproduce:
1. Create a repository:

(pulp)[rbarlow@pamphlet]~/devel/pulp% pulp-admin puppet repo create --repo-id forge --queries=postgres --feed http://forge.puppetlabs.com

2. Try to publish it with a non-existing distributor id:

(pulp)[rbarlow@pamphlet]~/devel/pulp% python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from pulp.common import pic
pic.connect()
pic.POST ('/pulp/api/v2/repositories/forge/actions/publish/', {'id': "does_not_exist"})

Request Body
{
"id": "542ee4bcea912d1fe934f5ef"
}
Response Body
{
"spawned_tasks": [
{
"_href": "/pulp/api/v2/tasks/cf5413f6-ac5b-4d98-b740-7d720e3475eb/",
"task_id": "cf5413f6-ac5b-4d98-b740-7d720e3475eb"
}
],
"result": null,
"error": null
}
(202, {u'spawned_tasks': [{u'_href': u'/pulp/api/v2/tasks/cf5413f6-ac5b-4d98-b740-7d720e3475eb/', u'task_id': u'cf5413f6-ac5b-4d98-b740-7d720e3475eb'}], u'result': None, u'error': None})

Actual results:
In syslog, you will find this:

Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: Task pulp.server.managers.repo.publish.publish[cf5413f6-ac5b-4d98-b740-7d720e3475eb] raised unexpected: MissingResource({'resource_id': {'distributor': '542ee4bcea912d1fe934f5ef', 'repository': u'forge'}},)
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: Traceback (most recent call last):
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 240, in trace_task
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: R = retval = fun(*args, **kwargs)
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 315, in call
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: return super(Task, self).__call__(*args, **kwargs)
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 437, in protected_call
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: return self.run(*args, **kwargs)
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 80, in publish
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: raise MissingResource(repository=repo_id, distributor=distributor_id)
Oct 3 14:18:06 pamphlet pulp: celery.worker.job:ERROR: MissingResource: Missing resource(s): distributor=542ee4bcea912d1fe934f5ef, repository=forge

Expected results:
It would be reasonable to note the missing resource at the debug level (without traceback), but I don't think we should log 404s at INFO at all.

Additional info:
[0] https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/repo/publish.html#publish-a-repository

+ This bug was cloned from Bugzilla Bug #1149339 +

Actions #1

Updated by mhrivnak about 9 years ago

This may be fixed in 2.5 according to jcline.

+ This comment was cloned from Bugzilla #1149339 comment 1 +

Actions #2

Updated by jcline@redhat.com about 9 years ago

Sadly this is not fixed in 2.5. I believe my fix doesn't cover async tasks, so this is probably an issue for all async tasks that raise exceptions.

+ This comment was cloned from Bugzilla #1149339 comment 2 +

Actions #3

Updated by bmbouter about 9 years ago

  • Severity changed from Low to 1. Low
Actions #4

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #5

Updated by bmbouter about 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #6

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #7

Updated by bmbouter almost 4 years ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Also available in: Atom PDF