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 2001697 - content prepare fails with Katello::Errors::Pulp3Error: ‘NoneType’ object has no attribute ‘url’
Summary: content prepare fails with Katello::Errors::Pulp3Error: ‘NoneType’ object has...
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.7
Assignee: satellite6-bugs
QA Contact: Griffin Sullivan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-06 20:35 UTC by Tanya Tereshchenko
Modified: 2021-11-10 16:23 UTC (History)
5 users (show)

Fixed In Version: python-pulp_2to3_migration-0.11.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-10 16:23:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 9372 0 Normal CLOSED - CURRENTRELEASE Backport "‘NoneType’ object has no attribute ‘url’ when migrating distribution tree content" to 0.11.z 2021-09-10 21:06:59 UTC
Red Hat Product Errata RHBA-2021:4612 0 None None None 2021-11-10 16:23:52 UTC

Description Tanya Tereshchenko 2021-09-06 20:35:11 UTC
Description of problem:

For some distribution(kickstart) trees, content migration fails with

```
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/rq/worker.py", line 936, in perform_job
pulpcore-worker-2[51205]: rv = job.perform()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/rq/job.py", line 684, in perform
pulpcore-worker-2[51205]: self._result = self._execute()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/rq/job.py", line 690, in _execute
pulpcore-worker-2[51205]: return self.func(*self.args, **self.kwargs) 
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py", line 81, in migrate_from_pulp2
pulpcore-worker-2[51205]: migrate_content(plan, skip_corrupted=skip_corrupted)
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 55, in migrate_content
pulpcore-worker-2[51205]: plugin.migrator.migrate_content_to_pulp3(skip_corrupted=skip_corrupted)
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 150, in migrate_content_to_pulp3
pulpcore-worker-2[51205]: loop.run_until_complete(dm.create()) 
pulpcore-worker-2[51205]: File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
pulpcore-worker-2[51205]: return future.result()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 89, in create
pulpcore-worker-2[51205]: await pipeline
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
pulpcore-worker-2[51205]: await asyncio.gather(*futures)
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
pulpcore-worker-2[51205]: await self.run()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 181, in run
pulpcore-worker-2[51205]: self.migrate_to_pulp3(cmodel, ctype) 
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 375, in migrate_to_pulp3
pulpcore-worker-2[51205]: url=os.path.join(remote.url, relative_path),
pulpcore-worker-2[51205]: AttributeError: 'NoneType' object has no attribute 'url'
pulpcore-worker-2[51205]: Traceback (most recent call last):
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/rq/worker.py", line 936, in perform_job
pulpcore-worker-2[51205]: rv = job.perform()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/rq/job.py", line 684, in perform
pulpcore-worker-2[51205]: self._result = self._execute()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/rq/job.py", line 690, in _execute
pulpcore-worker-2[51205]: return self.func(*self.args, **self.kwargs) 
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py", line 81, in migrate_from_pulp2
pulpcore-worker-2[51205]: migrate_content(plan, skip_corrupted=skip_corrupted)
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 55, in migrate_content
pulpcore-worker-2[51205]: plugin.migrator.migrate_content_to_pulp3(skip_corrupted=skip_corrupted)
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 150, in migrate_content_to_pulp3
pulpcore-worker-2[51205]: loop.run_until_complete(dm.create()) 
pulpcore-worker-2[51205]: File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
pulpcore-worker-2[51205]: return future.result()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 89, in create
pulpcore-worker-2[51205]: await pipeline
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
pulpcore-worker-2[51205]: await asyncio.gather(*futures)
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
pulpcore-worker-2[51205]: await self.run()
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 181, in run
pulpcore-worker-2[51205]: self.migrate_to_pulp3(cmodel, ctype) 
pulpcore-worker-2[51205]: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 375, in migrate_to_pulp3
pulpcore-worker-2[51205]: url=os.path.join(remote.url, relative_path),
pulpcore-worker-2[51205]: AttributeError: 'NoneType' object has no attribute 'url'

```

Steps to Reproduce*
1. In Pulp 2, sync with immediate policy a kickstart repo which has images
2. Create a copy of this repo (create a CV)
3. Migrate without specifying an importer, or migrate only the copied repo

*These are steps only in Pulp terms, I'll update the description when we figure out the steps in Satellite to achieve that.


There are multiple reports of this issue upstream.

Comment 1 pulp-infra@redhat.com 2021-09-06 21:08:06 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2021-09-06 21:08:07 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-09-10 13:15:55 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2021-09-10 13:15:56 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-09-10 14:07:48 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2021-09-10 15:08:28 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 7 Tanya Tereshchenko 2021-09-10 20:16:59 UTC
Fixed in pulp-2to3-migration 0.11.5.

Comment 8 pulp-infra@redhat.com 2021-09-10 21:07:00 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 10 Griffin Sullivan 2021-10-13 16:45:52 UTC
Verified in 6.9.7 snap 1

Code from the attached upstream issue is in the snap. I also tested re-migration and found no regressions or errors with the content views.

Steps to Reproduce:
1. Enable and Sync RHEL 7 Kickstart
2. Create a new content view with the repo
3. Run satellite-maintain content prepare
4. Delete the content view and create a new one (I recreated with a synced RHEL 8 Kickstart)
5. Run satellite-maintain content prepare

Expected Results:
No errors or regressions before and after the content prepare commands.

Actual Results:
No errors or regressions before and after the content prepare commands.

Comment 15 errata-xmlrpc 2021-11-10 16:23:39 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 (Satellite 6.9.7 Async 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/RHBA-2021:4612


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