Actions
Issue #1929
closedThe 0023_importer_tls_storage.py migration assumes that Importers always have configs when they do not
Start date:
Due date:
Estimated time:
Severity:
4. Urgent
Version:
2.8.3
Platform Release:
2.8.4
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:
Description
Alan Sparks reported on pulp-list that he was unable to apply the upgrade to Pulp 2.8.3 due to an Importer in his database missing a config and the migration assuming the Importers always have configs:
Applying pulp.server.db.migrations version 23
Applying migration pulp.server.db.migrations.0023_importer_tls_storage failed.
Halting migrations due to a migration failure.
'config'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 193, in main
return _auto_manage_db(options)
File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 256, in _auto_manage_db
migrate_database(options)
File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 124, in migrate_database
update_current_version=not options.test)
File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 186, in apply_migration
migration.migrate()
File "/usr/lib/python2.6/site-packages/pulp/server/db/migrations/0023_importer_tls_storage.py", line 25, in migrate
_write_pem_file(pki_path, importer['config'], key, filename)
KeyError: 'config'
We just need to patch the migration to handle the config missing from the Importer. I'm marking this urgent because it's blocking a user from applying a security update.
Thanks to Alan Sparks for the issue report!
Actions
Change migration 23 to not assume that Importers have configs.
https://pulp.plan.io/issues/1929
fixes #1929