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 +

Actions #1

Updated by bmbouter about 9 years ago

Adding medium priority and 2.6.0 release because we can't release with this issue which is introduced in 2.6.0.

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

Actions #3

Updated by cduryee about 9 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1167908 comment 3 +

Actions #4

Updated by pthomas@redhat.com about 9 years ago

verified
Upgraded 2.5.3 -> 2.6

[root@gizmo ~]#
[root@gizmo ~]# sudo -u apache pulp-manage-db
Mongo database for connection is version 2.4.12
Loading content types.
Loading type descriptors [iso_support.json, rpm_support.json, puppet.json]
Parsing type descriptors
Validating type descriptor syntactic integrity
Validating type descriptor semantic integrity
Updating the database with types [iso, distribution, drpm, erratum, package_group, package_category, package_environment, rpm, srpm, yum_repo_metadata_file, puppet_module]
/usr/lib/python2.6/site-packages/pulp/server/db/connection.py:162: DeprecationWarning: The safe parameter is deprecated. Please use write concern options instead.
return method(*args, **kwargs)
Content types loaded.
Ensuring the admin role and user are in place.
Mongo database for connection is version 2.4.12
Admin role and user are in place.
Beginning database migrations.
Applying pulp.server.db.migrations version 11
Migration to pulp.server.db.migrations version 11 complete.
Applying pulp.server.db.migrations version 12
Migration to pulp.server.db.migrations version 12 complete.
Migration package pulp_puppet.plugins.migrations is up to date at version 2
Migration package pulp_rpm.plugins.migrations is up to date at version 18
Database migrations complete.
[root@gizmo ~]#
[root@gizmo ~]#
[root@gizmo ~]#
[root@gizmo ~]#
[root@gizmo ~]#

+ This comment was cloned from Bugzilla #1167908 comment 4 +

Actions #5

Updated by bmbouter about 9 years ago

  • Severity changed from High to 3. High
Actions #6

Updated by rbarlow almost 9 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #8

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF