Red Hat Satellite 6: Repository or Capsule sync fails with Error: Katello::Errors::Pulp3Error Parsing interrupted: The repository metadata being synced into Pulp is erroneous in a way that makes it ambiguous (duplicate PKGIDs).
Environment
- Red Hat Satellite 6.10+
- Red Hat Satellite Capsule 6.10+
Issue
-
Repository sync or Capsule sync task fails on Satellite with the following error.
Error: Katello::Errors::Pulp3Error Parsing interrupted: The repository metadata being synced into Pulp is erroneous in a way that makes it ambiguous (duplicate PKGIDs), and therefore we do not allow it to be synced in 'mirror_complete' mode. Please choose a sync policy which does not mirror repository metadata. Please read https://github.com/pulp/pulp_rpm/issues/2402 for more details.
Resolution
-
From the failed task details identify the
repository_id: xxx. -
On Satellite WebUI, change the repository Mirroring Policy From
Complete MirroringtoAdditiveand perform theAdvanced Syncwith theOptimizedoption.Satellite Web UI → Content → Products → <Product Name> → Find the repository → Click on the repository Mirroring Policy And select as Additive -
In case the affected repository is part of a Content View, it might be necessary to republish the CV now.
-
To sync the Capsule with all the content:
Satellite Web UI → Infrastructure → Capsules → Select the Capsule → Use the drop-down next to Synchronize → Run Complete Sync -
If the issue still persists, note the concerned content-view name from
relative pathfrom the below command:# hammer repository info --id xxx -
Publish and promote those content views and then perform
complete syncfor the capsule.
For more KB articles/solutions related to Red Hat Satellite 6.x Capsule Sync Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Capsule Sync Issues
Root Cause
Additive Mirroring Policy- Neither the content nor the repodata is mirrored. Thus, only new content added since the last synchronization is added to the local repository and nothing is removed.
Diagnostic Steps
-
Find out the Product and repository name from the failed Task details and identify the repository_id.
#Action: Actions::Pulp3::CapsuleContent::RefreshDistribution #Input {"repository_id"=>100, "smart_proxy_id"=>5, "options"=>{"contents_changed"=>true}, "remote_user"=>"admin", "remote_cp_user"=>"admin", "current_request_id"=>"2bb2acd5-7eb3-46c2-bf25-xxxxxxxxxx", "current_timezone"=>"Asia/Kolkata", "current_organization_id"=>1, "current_location_id"=>nil, "current_user_id"=>33} #Output: {} #Exception: RuntimeError: Could not lookup a publication_href for repo 100# hammer repository list | grep 100 100 | Red Hat Satellite Tools 6.10 for RHEL 8 x86_64 RPMs | Red Hat Enterprise Linux for x86_64 | yum | https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/sat-tools/6.10/os# echo "select * from katello_repositories where id=100;" | su - postgres -c "psql -d foreman"
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.