Project

Profile

Help

Issue #628

closed

2.5.X -> 2.6.0 upgrade causes traceback

Added by bmbouter about 9 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.5
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Chris got this error after upgrading from 2.5.0 to 2.6.0 alpha:

pulp: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._queue_reserved_task[3b65119e-5f49-449a-b67a-5f5dec5d50eb]
beavqe-net0 pulp: celery.worker.job:ERROR: (5357-96480) Task pulp.server.async.tasks._queue_reserved_task[3b65119e-5f49-449a-b67a-5f5dec5d50eb] raised unexpected: KeyError('worker_name',)
pulp: celery.worker.job:ERROR: (5357-96480) Traceback (most recent call last):
pulp: celery.worker.job:ERROR: (5357-96480) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
pulp: celery.worker.job:ERROR: (5357-96480) R = retval = fun(*args, **kwargs)
pulp: celery.worker.job:ERROR: (5357-96480) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in protected_call
pulp: celery.worker.job:ERROR: (5357-96480) return self.run(*args, **kwargs)
pulp: celery.worker.job:ERROR: (5357-96480) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 64, in _queue_reserved_task
pulp: celery.worker.job:ERROR: (5357-96480) worker = resources.get_unreserved_worker()
pulp: celery.worker.job:ERROR: (5357-96480) File "/usr/lib/python2.7/site-packages/pulp/server/managers/resources.py", line 62, in get_unreserved_worker
pulp: celery.worker.job:ERROR: (5357-96480) reserved_names = [r['worker_name'] for r in resources.ReservedResource.get_collection().find()]
pulp: celery.worker.job:ERROR: (5357-96480) KeyError: 'worker_name'

The cause is the ReservedResource model change [0]. The solution is to create a new migration that deletes all documents from the reserved_resource collection. It's safe to do because the workers will recreate them once they start with the right attributes for the 2.6 code.

[0]: https://github.com/pulp/pulp/pull/1158/files?diff=unified#diff-5d58b00ed0c231fdf673ede3a6680640R88

+ This bug was cloned from Bugzilla Bug #1167908 +

Also available in: Atom PDF