Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2213515 - Upgrade to 6.14 fails on rpm.0048_artifacts_dependencies_fix migration with TypeError: 'NoneType' object is not subscriptable
Summary: Upgrade to 6.14 fails on rpm.0048_artifacts_dependencies_fix migration with T...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.14.0
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-08 11:30 UTC by Lukas Pramuk
Modified: 2023-11-08 14:19 UTC (History)
8 users (show)

Fixed In Version: python-pulp-rpm-3.19.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:19:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulp_rpm issues 3177 0 None closed Upgrade fails on rpm.0048_artifacts_dependencies_fix migration with TypeError: 'NoneType' object is not subscriptable 2023-06-29 17:04:02 UTC
Red Hat Issue Tracker SAT-18225 0 None None None 2023-06-08 11:34:11 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:19:47 UTC

Description Lukas Pramuk 2023-06-08 11:30:42 UTC
Description of problem:
Upgrade to 6.14 fails on rpm.0048_artifacts_dependencies_fix migration with TypeError: 'NoneType' object is not subscriptable

Version-Release number of selected component (if applicable):
6.14.0 Snap 3 (regression against Snap 2)
python39-pulp-rpm-3.19.2-1.el8pc.noarch

How reproducible:
always with some 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 ansible.0046_add_fulltext_search_fix... OK
  Applying core.0095_artifactdistribution... OK
  Applying core.0096_alter_task_logging_cid... OK
  Applying core.0097_remove_telemetry_task_schedule... OK
  Applying core.0098_pulp_labels... OK
  Applying file.0015_allow_null_manifest... OK
  Applying rpm.0046_rbac_perms... OK
  Applying rpm.0047_modulemd_datefield... OK
  Applying rpm.0048_artifacts_dependencies_fix...Traceback (most recent call last):
  File "/usr/bin/pulpcore-manager", line 33, in <module>
    sys.exit(load_entry_point('pulpcore==3.22.2', '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/0048_artifacts_dependencies_fix.py", line 31, in fixup_modulemd_artifacts_dependencies
    mmd.artifacts = modulemd["data"].get("artifacts", {}).get("rpms", [])
TypeError: 'NoneType' object is not subscriptable

Comment 9 Robin Chan 2023-06-29 17:04:03 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 10 Robin Chan 2023-06-29 17:04:06 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 11 Lukas Pramuk 2023-07-14 13:24:59 UTC
VERIFIED.

@Satellite 6.14.0 Snap7
python39-pulp-rpm-3.19.8-1.el8pc.noarch

by running customer DB automation job

Pulpcore migration gets past failure point 
However it is failing on next migration too - BZ#2222907

Comment 14 errata-xmlrpc 2023-11-08 14:19:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.14 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6818


Note You need to log in before you can comment on or make changes to this bug.