When i update my two products which are the 18.04 and 20.04 ubuntu repo’s (the default onces). They give the following errors:
duplicate key value violates unique constraint “core_publishedartifact_publication_id_relative__97f785f4_uniq”
DETAIL: Key (publication_id, relative_path)=(6790107c-dc2f-4375-90d0-0656462a497d, pool/all/f/flashrom/libflashrom-dev_1.2-5_amd64.deb) already exists.
I already re-made the repo’s but still ended up with the same problem. I also tried running:
foreman-maintain service stop
foreman-rake katello:delete_orphaned_content RAILS_ENV=production
But to no avail. The repo’s aren’t 48 hours old yet i believe.
They did all 3 complete but only when i did them indiviually.
I did read about this issue but i’m not sure how to resolve it, i believe there’s some sort of product or two which pulp can’t handle somehow. Everything else works great except this.
Thank you in advance!
all 3 products can sync with their upstream withoud any issues (at the same time/when using the same sync plan).
Foreman and Proxy versions:
This is most likely a bug in pulp_deb. You can open an issue here: Issues · pulp/pulp_deb · GitHub
Be sure to include the pulp_deb version (python39-pulp-deb-2.18.0-3.el8.noarch) as well as a link to this thread.
That being said, I doubt this issue can be prioritized and fixed very quickly, so I recommend trying the following workaround for now:
Try breaking up your Katello repos into several repositories, that sync one APT distribution each. So instead of having one repo with Releases/Distributions: focal forcal-updates focal-backports focal-security, create one Katello repo with Releases/Distributions: focal, and another with Releases/Distributions: focal-updates, and so forth. If breaking up the repos in this way makes the errors go away, then that is also good debugging information.
Heya! First of all thank you for your reply! I changed the products to be the same as ubuntu set’s them, and everything sync’s up perfect :). Had a typo but that’s fixed aswell!
While i don’t think i have the logs for it anymore, it might be possible that if i only keep the 4 unique release/distributions but give it all the components that it might work again. I’ll try that out aswell and from there i’ll submit a bug report thank you again for ya helpful advice!
No they are two different bugs. I think your bug happens when the same package is synced from multiple distributions (within a single sync), and then there is some kind of race condition on creating the one DB entry for the duplicate package. The bug you linked above on the other hand concerns only metadata (not packages), and cannot occur within a single sync.
I am glad you can work around the problem for now, since I don’t think your bug is an easy problem to solve, and is therefore unlikely to be fixed very quickly.