Bug 2229095 - CertificateCleanupJob fails with foreign key constraint violation on table cp_certificate [NEEDINFO]
Summary: CertificateCleanupJob fails with foreign key constraint violation on table cp...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.11.5
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: Unspecified
Assignee: Barnaby Court
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks: 2231503
TreeView+ depends on / blocked
 
Reported: 2023-08-04 06:16 UTC by Alexey Masolov
Modified: 2023-08-16 12:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2231503 (view as bug list)
Environment:
Last Closed:
Target Upstream Version:
Embargoed:
hyu: needinfo? (nmoumoul)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CANDLEPIN-643 0 None None None 2023-08-04 13:56:34 UTC

Description Alexey Masolov 2023-08-04 06:16:55 UTC
Description of problem:

On a very loaded system "CertificateCleanupJob" job shows following error:

2023-08-03 17:45:22,829 [thread=Thread-3 (ActiveMQ-client-global-threads)] [job=8a35b3cf89b9b7aa0189bb44de043b1b, job_key=CertificateCleanupJob, org=, csid=] WARN  org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 23503
2023-08-03 17:45:22,829 [thread=Thread-3 (ActiveMQ-client-global-threads)] [job=8a35b3cf89b9b7aa0189bb44de043b1b, job_key=CertificateCleanupJob, org=, csid=] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ERROR: update or delete on table "cp_cert_serial" violates foreign key constraint "fk16370c54b9410fc" on table "cp_certificate"
  Detail: Key (id)=(1298353109733755480) is still referenced from table "cp_certificate".
2023-08-03 17:45:22,840 [thread=Thread-3 (ActiveMQ-client-global-threads)] [job=8a35b3cf89b9b7aa0189bb44de043b1b, job_key=CertificateCleanupJob, org=, csid=] ERROR org.candlepin.async.JobManager - Job "CertificateCleanupJob" failed in 20722815ms

Version-Release number of selected component (if applicable):
Satellite 6.11

Comment 4 William Poteat 2023-08-04 14:17:41 UTC
Can I get a database dump for this?

Comment 15 William Poteat 2023-08-15 13:53:01 UTC
Then certificates that are not yet expired but have been revoked can be used to retrieve content.

What specific performance is currently affected? Deleting rows with no concrete justification is not advisable.

If there are rows that the job is not removing, they are there for a reason.


Note You need to log in before you can comment on or make changes to this bug.