Project

General

Profile

Bug #24732

FIPS Scheduled synchronization task ends with PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_repository_rpms_on_rpm_id_and_repository_id"

Added by Peter Ondrejka about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Testing on CentOS with FIPS environment enabled using katello-3.9.0-5.el7.noarch,
when a repo synchronization is triggered by a recurring syncplan, the first run fails with the following exception:

```
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_repository_rpms_on_rpm_id_and_repository_id"
DETAIL: Key (rpm_id, repository_id)=(1, 541) already exists.
: INSERT INTO katello_repository_rpms (rpm_id, repository_id, created_at, updated_at) VALUES (1, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (2, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (3, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (4, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (5, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (6, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (7, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (8, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (9, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (10, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (11, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (12, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (13, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (14, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (15, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (16, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (17, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (18, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (19, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (20, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (21, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (22, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (23, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (24, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (25, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (26, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (27, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (28, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (29, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (30, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (31, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04'), (32, 541, '2018-08-23 14:22:04', '2018-08-23 14:22:04')

```

This does not occur on additional runs, just the initial one.
Manually triggered synchronization does not have this, only syncplan-triggered.
However it is not 100% reproducible.
It is exclusive to FIPS enabled machine, does not occur on non-fips under same cicumstances.

Backtace in supplement.

backtrace.txt backtrace.txt 13.9 KB Peter Ondrejka, 08/28/2018 12:29 PM

Related issues

Related to Foreman - Feature #3511: As a security person, I would like Foreman to run in FIPS modeResolved

History

#1 Updated by Peter Ondrejka about 2 years ago

  • Related to Feature #3511: As a security person, I would like Foreman to run in FIPS mode added

#2 Updated by John Mitsch about 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.9.0
  • Assignee set to Samir Jha
  • Category set to Repositories
  • Found in Releases Katello 3.9.0 added
  • Found in Releases deleted (Katello 3.9.1)

#3 Updated by Jonathon Turel about 2 years ago

  • Target version changed from Katello 3.9.0 to Katello 3.10.0

#4 Updated by Peter Ondrejka about 2 years ago

Reporting I no longer see the issue on CentOS with FIPS and katello-3.9.0-9.el7.noarch

#5 Updated by Peter Ondrejka about 2 years ago

  • Status changed from New to Resolved

Closing as this no longer happens on katello-3.9.0-11.el7.noarch on fips

Also available in: Atom PDF