Description of problem: pulp-manage-db upgrade fails from 2.1.1 to 2.2.0 Version-Release number of selected component (if applicable): 2.1.1 to 2.2.0 How reproducible: Works fine when there are only a few repositories. Only occurs when there are about 20 yum repositories being managed. Steps to Reproduce: 1. yum upgrade pulp* 2. pulp-manage-db 3. Actual results: Output of pulp-manage-db is... ---------------------------------------------------- Beginning database migrations. Migration package pulp.server.db.migrations is up to date at version 4 Migration package pulp_puppet.plugins.migrations is up to date at version 0 Applying pulp_rpm.migrations version 8 Migration to pulp_rpm.migrations version 8 complete. Applying pulp_rpm.migrations version 9 Migration to pulp_rpm.migrations version 9 complete. Applying pulp_rpm.migrations version 10 Migration to pulp_rpm.migrations version 10 complete. Applying pulp_rpm.migrations version 11 Applying migration pulp_rpm.migrations.0011_new_importer failed. See log for details. 2013-10-28 11:40:21,611 db:CRITICAL: Applying migration pulp_rpm.migrations.0011_new_importer failed. 2013-10-28 11:40:21,611 db:CRITICAL: 'repodata' 2013-10-28 11:40:21,611 db:CRITICAL: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 79, in migrate_database update_current_version=not options.test) File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 161, in apply_migration migration.migrate() File "/usr/lib/python2.6/site-packages/pulp_rpm/migrations/0011_new_importer.py", line 29, in migrate _migrate_collection(type_id) File "/usr/lib/python2.6/site-packages/pulp_rpm/migrations/0011_new_importer.py", line 39, in _migrate_collection text = package['repodata']['primary'].encode(codec) KeyError: 'repodata' Database migrations complete. Loading content types. Content types loaded. ---------------------------------------------------- Expected results: Database upgrade completes without error Additional info:
I am in the #pulp IRC channel, username rocketeer125.
Suspect there is some edge case around a specific repository not being handled correctly.
Issue was due to a specific RPM. Workaround achieved by deleting the RPM and rerunning pulp-manage-db. This RPM was at fault: SON([(u'_storage_path', u'/var/lib/pulp/content/rpm/.//vmware-open-vm-tools-common/8.3.17/784891.el6/x86_64/ad611ef70b76c22a52b153c7f869d12da67b4761a6d42ad0bdb1435093e29d6f/vmware-open-vm-tools-common-8.3.17-784891.el6.x86_64.rpm'), (u'name', u'vmware-open-vm-tools-common'), (u'release_sort_index', u'06-784891.$el.01-6'), (u'checksum', u'ad611ef70b76c22a52b153c7f869d12da67b4761a6d42ad0bdb1435093e29d6f'), (u'filename', u'vmware-open-vm-tools-common-8.3.17-784891.el6.x86_64.rpm'), (u'epoch', u'0'), (u'version', u'8.3.17'), (u'version_sort_index', u'01-8.01-3.02-17'), (u'arch', u'x86_64'), (u'_content_type_id', u'rpm'), (u'release', u'784891.el6'), (u'_id', u'b66e8519-d7e7-4ce1-a6d6-3a1391366a09'), (u'relativepath', u'vmware-open-vm-tools-common-8.3.17-784891.el6.x86_64.rpm'), (u'_ns', u'units_rpm'), (u'checksumtype', u'sha256')]) Bug case left open for QA incase you want to follow up.