Actions
Issue #3056
closedrapidly dispatching sync of the same repo causes resource manager to print traceback
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 26
Quarter:
Description
http POST http://127.0.0.1:8000/api/v3/repositories/ name=example-repo notes:={} scratchpad:={}
http POST http://127.0.0.1:8000/api/v3/repositories/example-repo/importers/example-asyncio/ name=example-importer download_policy='immediate' repository='http://127.0.0.1:800/api/v3/repositories/example-repo/' feed_url='https://repos.fedorapeople.org/pulp/pulp/fixtures/file-mixed/PULP_MANIFEST' sync_mode='mirror'
http POST http://127.0.0.1:8000/api/v3/repositories/example-repo/importers/example-asyncio/example-importer/sync/
http POST http://127.0.0.1:8000/api/v3/repositories/example-repo/importers/example-asyncio/example-importer/sync/
http POST http://127.0.0.1:8000/api/v3/repositories/example-repo/importers/example-asyncio/example-importer/sync/
http POST http://127.0.0.1:8000/api/v3/repositories/example-repo/importers/example-asyncio/example-importer/sync/
The following shows up in the logs:
Task pulpcore.tasking.tasks._queue_reserved_task[c1c4b1c1-da9d-4c09-9bd0-d8c2f57bd5a5] raised unexpected: MultipleObjectsReturned('get() returned more than one ReservedResource -- it returned 2!',)
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/celery/app/trace.py", line 374, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/celery/app/trace.py", line 629, in __protected_call__
return self.run(*args, **kwargs)
File "/home/vagrant/devel/pulp/platform/pulpcore/tasking/tasks.py", line 75, in _queue_reserved_task
worker = ReservedResource.objects.get(resource=resource_id).worker
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/django/db/models/query.py", line 384, in get
(self.model._meta.object_name, num)
pulpcore.app.models.task.MultipleObjectsReturned: get() returned more than one ReservedResource -- it returned 2!
Updated by ttereshc about 7 years ago
- Priority changed from Normal to High
- Sprint/Milestone set to 45
- Severity changed from 2. Medium to 3. High
Updated by mhrivnak about 7 years ago
The model is missing a uniqueness constraint on "resource". That needs to be added, and then it's worth a quick audit of any code that creates them to make sure it's prepared for a duplicate key error.
Updated by dalley about 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
Added by dalley about 7 years ago
Added by dalley about 7 years ago
Revision 352caddd | View on GitHub
Fix traceback on rapid dispatch of multiple syncs
We need to be using a queryset for ReservedResources, not "get()".
Updated by dalley about 7 years ago
- Status changed from ASSIGNED to POST
Updated by dalley about 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|352caddd7748be31cf0d1d4c6964828d3a0f86eb.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Fix traceback on rapid dispatch of multiple syncs
We need to be using a queryset for ReservedResources, not "get()".
closes #3056 https://pulp.plan.io/issues/3056