Problem:
I have upgraded my production system (katello server, puppet proxy, content proxy) from 3.1.3/4.2.1 to 3.2.1/4.3.1. Now each time I run a complete sync I get an error like this:
duplicate key value violates unique constraint "core_repositoryversion_repository_id_number_3c54ce50_uniq"
DETAIL: Key (repository_id, number)=(74f3e561-ef72-4495-8b74-0d2b91ab87fe, 2) already exists.
I ran it twice during the last hour and I get exactly the same error message.
I have also tried yesterday, directly after the upgrade of the content proxy and I have got a different id (yes, twice in a single run):
duplicate key value violates unique constraint "core_repositoryversion_repository_id_number_3c54ce50_uniq"
DETAIL: Key (repository_id, number)=(ac46caa8-0b8b-4da6-bcb0-e2e40ec77e19, 12) already exists.
duplicate key value violates unique constraint "core_repositoryversion_repository_id_number_3c54ce50_uniq"
DETAIL: Key (repository_id, number)=(ac46caa8-0b8b-4da6-bcb0-e2e40ec77e19, 12) already exists.
New content has been synced and new content versions have been published since yesterday, so I suspect that’s why it looks different today.
The automatic, optimized sync after the cv promotion during the night was successful.
Expected outcome:
Successful sync.
Versions:
3.2.1/4.3.1 upgraded from 3.1.3/4.2.1.
Distribution and version:
CentOS 7.9 up-to-date