Actions
Issue #5881
closedCannot create publication for local file repo - duplicate key value error
Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Quarter:
Description
I'm trying to sync this repo again (https://github.com/Katello/katello/tree/master/test/fixtures/test_repos/zoo) but I'm hitting this error on pulp_rpm 3.0:
{"response"=>
{"task"=>"/pulp/api/v3/tasks/9f5612c6-cec7-4f7b-a14f-cf383567bf92/"},
"pulp_tasks"=>
[{"pulp_href"=>"/pulp/api/v3/tasks/9f5612c6-cec7-4f7b-a14f-cf383567bf92/",
"pulp_created"=>"2019-12-13T15:42:55.484+00:00",
"state"=>"failed",
"name"=>"pulp_rpm.app.tasks.publishing.publish",
"started_at"=>"2019-12-13T15:42:55.589+00:00",
"finished_at"=>"2019-12-13T15:42:55.851+00:00",
"error"=>
{"traceback"=>
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line 822, in perform_job\n" +
" rv = job.perform()\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 605, in perform\n" +
" self._result = self._execute()\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 611, in _execute\n" +
" return self.func(*self.args, **self.kwargs)\n" +
" File \"/usr/local/lib/pulp/src/pulp-rpm/pulp_rpm/app/tasks/publishing.py\", line 197, in publish\n" +
" create_repomd_xml(content, publication, publication_data.repomdrecords)\n" +
" File \"/usr/local/lib/pulp/src/pulp-rpm/pulp_rpm/app/tasks/publishing.py\", line 352, in create_repomd_xml\n" +
" file=File(open(path, 'rb'))\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/app/models/publication.py\", line 220, in create_from_file\n" +
" pa.save()\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 741, in save\n" +
" force_update=force_update, update_fields=update_fields)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 779, in save_base\n" +
" force_update, using, update_fields,\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 870, in _save_table\n" +
" result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 908, in _do_insert\n" +
" using=using, raw=raw)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/manager.py\", line 82, in manager_method\n" +
" return getattr(self.get_queryset(), name)(*args, **kwargs)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\", line 1186, in _insert\n" +
" return query.get_compiler(using=using).execute_sql(return_id)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\", line 1368, in execute_sql\n" +
" cursor.execute(sql, params)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 67, in execute\n" +
" return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 76, in _execute_with_wrappers\n" +
" return executor(sql, params, many, context)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 84, in _execute\n" +
" return self.cursor.execute(sql, params)\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/utils.py\", line 89, in __exit__\n" +
" raise dj_exc_value.with_traceback(traceback) from exc_value\n" +
" File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 84, in _execute\n" +
" return self.cursor.execute(sql, params)\n",
"description"=>
"duplicate key value violates unique constraint \"core_publishedartifact_publication_id_relative__97f785f4_uniq\"\n" +
"DETAIL: Key (publication_id, relative_path)=(3199e1e6-46fd-4a03-95ab-6e80294149b7, repodata/569c0ac32432a213086793a70502228a2be995bc5134801fe1582c408f8d971b-swidtags.xml.gz) already exists.\n"},
"worker"=>"/pulp/api/v3/workers/1c96e753-a520-4007-b204-89c55728c4af/",
"progress_reports"=>[],
"created_resources"=>[],
"reserved_resources_record"=>
["/pulp/api/v3/repositories/rpm/rpm/1905534d-713f-4aee-8d86-8805b189db04/"]}],
"poll_attempts"=>{"total"=>1, "failed"=>1}}
Updated by iballou over 4 years ago
- Subject changed from Cannot sync local file repo - duplicate key value error to Cannot create publication for local file repo - duplicate key value error
Updated by iballou over 4 years ago
To clarify I meant sync as in Katello sync. The Pulp 3 sync itself worked but creating the publication failed.
Updated by iballou over 4 years ago
I also get it when syncing this repo: https://partha.fedorapeople.org/test-repos/armadillo/
There's a chance that they share content since they're both test fixture repos.
Updated by iballou over 4 years ago
- Tags Katello-P2 added
- Tags deleted (
Katello-P1)
So I reinstalled Pulp and it fixed the issue, I suppose it still could be a bug however.
Updated by ggainey over 4 years ago
- Status changed from NEW to CLOSED - WORKSFORME
Closing as WORKSFORME for now. If we can reproduce the problem, re-open.
Updated by ggainey almost 4 years ago
- Tags Katello added
- Tags deleted (
Katello-P2)
Actions