-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
0
-
Phoenix - Content
-
-
-
Sprint 140
Description of problem:
Content Import task failed indexing errata from Pulp with the following error.
Actions::Katello::Repository::IndexContent (error) ActiveRecord::StatementInvalid (PG::CardinalityViolation: ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time) HINT: Ensure that no rows proposed for insertion within the same command have duplicate constrained values. - "/usr/share/gems/gems/katello-4.9.0.25/app/services/katello/pulp3/pulp_content_unit.rb:88:in `loop`" - "/usr/share/gems/gems/katello-4.9.0.25/app/services/katello/pulp3/pulp_content_unit.rb:88:in `block in pulp_units_batch_for_repo`" - "/usr/share/gems/gems/katello-4.9.0.25/app/services/katello/content_unit_indexer.rb:26:in `each`" - "/usr/share/gems/gems/katello-4.9.0.25/app/services/katello/content_unit_indexer.rb:26:in `each`" - "/usr/share/gems/gems/katello-4.9.0.25/app/services/katello/content_unit_indexer.rb:26:in `import_all`" - "/usr/share/gems/gems/katello-4.9.0.25/app/models/katello/repository.rb:972:in `block (2 levels) in index_content`" - "/usr/share/gems/gems/katello-4.9.0.25/app/lib/katello/logging.rb:8:in `time`" - "/usr/share/gems/gems/katello-4.9.0.25/app/models/katello/repository.rb:971:in `block in index_content`" - "/usr/share/gems/gems/katello-4.9.0.25/app/models/katello/repository.rb:970:in `each`" - "/usr/share/gems/gems/katello-4.9.0.25/app/models/katello/repository.rb:970:in `index_content`" - "/usr/share/gems/gems/katello-4.9.0.25/app/lib/actions/katello/repository/index_content.rb:22:in `run`"
Postgresql log
ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time HINT: Ensure that no rows proposed for insertion within the same command have duplicate constrained values. STATEMENT: INSERT INTO "katello_errata" ("title","severity","description","reboot_suggested","solution","summary","pulp_id","issued","updated","errata_id","errata_type","created_at","updated_at") VALUES ...
Is this issue a regression from an earlier version:
Yes. The following bug is fixed in previous Satellite versions, but the code didn't brought forward after refactoring the index content codes.
https://bugzilla.redhat.com/show_bug.cgi?id=2070535
Additional info:
Due to some bugs in Pulp, it is still possible to have duplicate errata associated to a repository version. It is causing issue to Katello because Katello doesn't expect duplicate errata in a repository version. **
https://github.com/pulp/pulp_rpm/issues/2821
QE Tracker for https://issues.redhat.com/browse/SAT-27299