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 1929393 - pulp3: 'NoneType' object has no attribute 'cast' on metadata_checksum_type
Summary: pulp3: 'NoneType' object has no attribute 'cast' on metadata_checksum_type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.9.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-16 19:11 UTC by Tanya Tereshchenko
Modified: 2021-04-21 13:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:10:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 8195 0 Normal CLOSED - CURRENTRELEASE NoneType' object has no attribute 'cast on metadata_checksum_type 2021-02-18 21:05:50 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:10:58 UTC

Description Tanya Tereshchenko 2021-02-16 19:11:16 UTC
Description of problem:

'NoneType' object has no attribute 'cast'
    "traceback": "  File \"/usr/lib/python3.6/site-packages/rq/worker.py\", line 936, in perform_job
    rv = job.perform()
  File \"/usr/lib/python3.6/site-packages/rq/job.py\", line 684, in perform
    self._result = self._execute()
  File \"/usr/lib/python3.6/site-packages/rq/job.py\", line 690, in _execute
    return self.func(*self.args, **self.kwargs)
  File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py\", line 136, in migrate_from_pulp2
    pre_migrate_all_without_content(plan, type_to_repo_ids, repo_id_to_type)
  File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/pre_migration.py\", line 384, in pre_migrate_all_without_content
    repo_id, distributors_repos, distributor_migrators, repo)
  File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/pre_migration.py\", line 556, in pre_migrate_distributor
    needs_new_publication = dist_migrator.needs_new_publication(distributor)
  File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/repository.py\", line 105, in needs_new_publication
    current_checksum_type = pulp2distributor.pulp3_publication.cast().metadata_checksum_type

from:

https://community.theforeman.org/t/contentmigration-migration-fails-with-error-katello-nonetype-object-has-no-attribute-cast/21828/10


The issue occurs when:

 * pre-migration for a distributor happened, but migration did not
 * then pulp2 distributor changed
 * then migration plan was run again

Comment 1 pulp-infra@redhat.com 2021-02-16 20:06:35 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2021-02-16 20:06:36 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-02-16 21:05:42 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 4 pulp-infra@redhat.com 2021-02-18 21:05:50 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 6 Lai 2021-03-22 21:17:57 UTC
The nonetype issue was experienced on both dogfood and customer db.  I have ran migration on both instance and they have migrated successfully therefore this issue does not show up.

Verified on 6.9.0_17, python3-pulp-2to3-migration-0.9.1-1.el7pc.noarch

Comment 9 errata-xmlrpc 2021-04-21 13:10:34 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 (Moderate: Satellite 6.9 Release), 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-2021:1313


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