Sync plan error: duplicate pkgid

Hello, I have a Foreman server at work that we use to update and patch 60 RHEL servers, some being 7, some being 8.

A couple weeks ago I noticed that the AppStream sync of both RHEL 7 and 8 is incomplete and returns this error:

I tried checking the github link in the error but I couldn’t find a solution.

The publish of the RHEL 7 & 8 content views goes fine and also their respective LCEs, but when I try to run “yum update” to the RHEL 7 and 8 servers provisioned with Foreman, it always returns that all packages are updated (meaning that the content view didn’t update the new packages because the sync is in error).

The Foreman version is 2.5.4.

Thanks a lot for your help,
Francesco

You need to update the mirroring policy of the repository to something which is not “mirror complete.” Products > (your product name) > Repositories > (your repo name) > Mirroring Policy, try changing it to Additive or Content Only and sync again. You could also try an Advanced Sync / complete sync.

Hello,
I couldn’t find the Mirroring Policy in the repo page:

Is it in another page?

Thanks
Francesco

It is on that page, just below where your screenshot ends:

1 Like

Hello,
The Mirroring Policy option is not present in my Foreman:

The Foreman version is 2.5.4.

Thanks,
Francesco

This is 10 Y-releases old.

As @quba42 already mentioned, you are on a really old version and I would highly recommend updating to a more recent one soon.
I think the mirror policy was introduced around Foreman 3.0, but I cannot remember exactly. On your Foreman version, you might have success with changing the “Mirror on Sync” option to no. Iirc, this did also change the mirror policy in Pulp.

Mirroring policy was previously called “Mirror on Sync.” It was changed to “Mirroring Policy” when complete mirroring was introduced, so I’m honestly not sure how one of your pulp repos got set to complete mirroring. Perhaps the error message is incorrect somehow?

anyway, I highly recommend upgrading to a supported release. If you can’t do that, deleting and recreating the repository may be the best option.

Hello,
Sorry but I can’t update the version because I’m not the direct responsible person of this server at work, I’ll try the Mirror on Sync option and let you know.

Thanks,
Francesco