Pulp2 to pulp3 migration fails on certain repos during "satellite-maintain content prepare" step with FileNotFoundError: [Errno 2] No such file or directory: '' in prepare_metadata_files
Environment
- Red Hat Satellite 6.9
(Preparing to migrate contents to pulp3)
Issue
- 'satellite-maintain content prepare' stop with error:
ForemanTasks::TaskError: Task b2b5e67f-6dcf-498e-aebf-bf018f292101: Katello::Errors:Pulp3Error: 2 subtask(s) failed for task group /pulp/api/v3/task-groups/0c042b87-877d-4061-bf61-05fd73c4a69b/
- Traceback error caught on log:
Feb 10 10:34:11 mysat6 pulpcore-worker-2: pulp: pulp_rpm.app.tasks.publishing:INFO: Publishing: repository=cv-test-Red_Hat_Ansible_Engine_2_6_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64, version=4
:
Feb 10 10:34:12 mysat6 pulpcore-worker-2: pulp: rq.worker:ERROR: Traceback (most recent call last):
Feb 10 10:34:12 mysat6 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/rq/worker.py", line 936, in perform_job
:
Feb 10 10:34:12 mysat6 pulpcore-worker-2: self.repomdrecords = self.prepare_metadata_files(main_content)
Feb 10 10:34:12 maysat6 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/publishing.py", line 99, in prepare_metadata_files
Feb 10 10:34:12 mysat6 pulpcore-worker-2: with open(path, "wb") as new_file:
Feb 10 10:34:12 mysat6 pulpcore-worker-2: FileNotFoundError: [Errno 2] No such file or directory: ''
Resolution
This issue has been addressed by This content is not included.Bug 2027127 and fixed in the Red Hat Satellite 6.9.9 release
For more KB articles/solutions related to Red Hat Satellite 6.x Pulp 2.0 to Pulp 3.0 Migration Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Pulp 2.0 to Pulp 3.0 Migration Issues
Root Cause
- This is hitting a bug where some repositories cannot be publish during pulp2 to pulp3 migration due to metadata files not found.
Diagnostic Steps
- Running rake commands still doesn't fix the issue:
# foreman-rake katello:correct_repositories COMMIT=true
# foreman-rake katello:reimport
# foreman-rake katello:delete_orphaned_content
SBR
Product(s)
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.