Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2027127

Summary: Pulp 2 to 3 migration fails on certain repos during the upgrade with FileNotFoundError: [Errno 2] No such file or directory: '' in prepare_metadata_files
Product: Red Hat Satellite Reporter: matt jia <mjia>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: high    
Version: 6.9.0CC: ahumbe, arahaman, bbuckingham, dalley, dhjoshi, dkliban, dmule, ggainey, hyu, jalviso, jkho, jpasqual, myoder, osousa, pmendezh, rbarrott, rchan, satellite6-bugs, saydas, ttereshc, vsedmik, wclark
Target Milestone: 6.9.9Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: pulp_rpm-3.11.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-20 20:34:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description matt jia 2021-11-29 00:01:54 UTC
Description of problem:

'satellite-maintain content prepare' command failed on certain repos. Here is an example traceback:

Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 478, in migrate_repo_distributor
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: pulp2dist, repo_version)
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/repository.py", line 91, in migrate_to_pulp3
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: publish(repo_version.pk, checksum_types=checksum_types, sqlite_metadata=sqlite)
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/publishing.py", line 344, in publish
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: publication_data.populate()
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/publishing.py", line 253, in populate
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: self.repomdrecords = self.prepare_metadata_files(main_content)
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/publishing.py", line 99, in prepare_metadata_files
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: with open(path, "wb") as new_file:
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: FileNotFoundError: [Errno 2] No such file or directory: ''
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-1: pulp: rq.worker:INFO: 27738.com: c0d58c5a-9ff1-4d40-bbb3-9c24fdf0fdb4
Nov 22 21:31:34 1002a1103081001 pulpcore-resource-manager: pulp: rq.worker:INFO: resource-manager: 43f43c1a-d09e-46bd-99fe-73b6e2ee397c
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-3: pulp: rq.worker:INFO: 27740.com: Job OK (b25f3fa2-401c-425c-92eb-b49a61415617)
Nov 22 21:31:34 1002a1103081001 pulpcore-worker-2: pulp: pulp_rpm.app.tasks.publishing:INFO: Publishing: repository=XXX-Red_Hat_Ansible_Engine_2_7_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64, version=1
 

Version-Release number of selected component (if applicable):

6.10

How reproducible:

on customer site

Steps to Reproduce:

run  'satellite-maintain content prepare' as part of the upgrade process

Actual results:

'satellite-maintain content prepare' failed to complete and blocked the upgrade

Expected results:


'satellite-maintain content prepare' should complete successfully.

Comment 1 matt jia 2021-11-29 00:05:17 UTC
For some reason, there are several records in the table core_contentartifact where relative_path is empty. We've tried

foreman-rake katello:correct_repositories COMMIT=true
foreman-rake katello:reimport
satellite-maintain content migration-reset
foreman-rake katello:delete_orphaned_content

and no luck. Could anyone please help troubleshoot the issue?

Thanks,

Matt

Comment 8 pulp-infra@redhat.com 2021-12-13 17:15:40 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2021-12-13 17:15:41 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2021-12-15 16:12:34 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 13 pulp-infra@redhat.com 2021-12-18 17:15:46 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 14 pulp-infra@redhat.com 2021-12-18 17:15:47 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 15 pulp-infra@redhat.com 2021-12-20 17:18:58 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 16 pulp-infra@redhat.com 2021-12-22 16:12:44 UTC
The Pulp upstream bug status is at CLOSED - DUPLICATE. Updating the external tracker on this bug.

Comment 17 pulp-infra@redhat.com 2021-12-22 17:18:28 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 19 Tanya Tereshchenko 2022-01-07 16:29:52 UTC
Fixed in pulp_rpm 3.11.3

Comment 20 wclark 2022-01-21 21:27:04 UTC
Changed version to 6.9.0 because the pulp 2to3 content migration runs on 6.9.z as a pre-requisite to the upgrade to 6.10

Comment 35 errata-xmlrpc 2022-04-20 20:34:52 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.9.9 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/RHSA-2022:1478

Comment 37 Daniel Alley 2022-10-21 01:48:30 UTC
*** Bug 2033128 has been marked as a duplicate of this bug. ***

Comment 39 Red Hat Bugzilla 2023-09-18 04:28:38 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days