Description of problem:
Upgrade to 6.14 fails on rpm.0049_profiles_fix migration with TypeError: 'NoneType' object is not subscriptable
Version-Release number of selected component (if applicable):
6.14.0 Snap 7
python39-pulp-rpm-3.19.8-1.el8pc.noarch
How reproducible:
always with specific pulp data
Steps to Reproduce:
1. Upgrade 6.13 to 6.14.0
...
2023-06-08 07:01:36 [ERROR ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: change from 'notrun' to ['0'] failed: 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
Actual results:
upgrade fails on pulpcore migration
Expected results:
upgrade finishes successfully
Additional info:
Operations to perform:
Apply all migrations: ansible, auth, certguard, container, contenttypes, core, file, rpm, sessions
Running migrations:
Applying rpm.0049_profiles_fix...Traceback (most recent call last):
File "/usr/bin/pulpcore-manager", line 33, in <module>
sys.exit(load_entry_point('pulpcore==3.22.7', 'console_scripts', 'pulpcore-manager')())
File "/usr/lib/python3.9/site-packages/pulpcore/app/manage.py", line 11, in manage
execute_from_command_line(sys.argv)
File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 244, in handle
post_migrate_state = executor.migrate(
File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/lib/python3.9/site-packages/django/db/migrations/migration.py", line 126, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/lib/python3.9/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
self.code(from_state.apps, schema_editor)
File "/usr/lib/python3.9/site-packages/pulp_rpm/app/migrations/0049_profiles_fix.py", line 14, in fixup_modulemd_profiles
unprocessed_profiles = modulemd["data"].get("profiles", {})
TypeError: 'NoneType' object is not subscriptable
VERIFIED.
@Satellite 6.14.0 Snap10
python39-pulp-rpm-3.19.9-1.el8pc.noarch
by running customer DB automation job
>>> Pulpcore migration gets past failure point and finishes successfully
Description of problem: Upgrade to 6.14 fails on rpm.0049_profiles_fix migration with TypeError: 'NoneType' object is not subscriptable Version-Release number of selected component (if applicable): 6.14.0 Snap 7 python39-pulp-rpm-3.19.8-1.el8pc.noarch How reproducible: always with specific pulp data Steps to Reproduce: 1. Upgrade 6.13 to 6.14.0 ... 2023-06-08 07:01:36 [ERROR ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: change from 'notrun' to ['0'] failed: 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0] Actual results: upgrade fails on pulpcore migration Expected results: upgrade finishes successfully Additional info: Operations to perform: Apply all migrations: ansible, auth, certguard, container, contenttypes, core, file, rpm, sessions Running migrations: Applying rpm.0049_profiles_fix...Traceback (most recent call last): File "/usr/bin/pulpcore-manager", line 33, in <module> sys.exit(load_entry_point('pulpcore==3.22.7', 'console_scripts', 'pulpcore-manager')()) File "/usr/lib/python3.9/site-packages/pulpcore/app/manage.py", line 11, in manage execute_from_command_line(sys.argv) File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute output = self.handle(*args, **options) File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 89, in wrapped res = handle_func(*args, **kwargs) File "/usr/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 244, in handle post_migrate_state = executor.migrate( File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial) File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 227, in apply_migration state = migration.apply(state, schema_editor) File "/usr/lib/python3.9/site-packages/django/db/migrations/migration.py", line 126, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File "/usr/lib/python3.9/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards self.code(from_state.apps, schema_editor) File "/usr/lib/python3.9/site-packages/pulp_rpm/app/migrations/0049_profiles_fix.py", line 14, in fixup_modulemd_profiles unprocessed_profiles = modulemd["data"].get("profiles", {}) TypeError: 'NoneType' object is not subscriptable