Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1726683

Summary: PG::TRDeadlockDetected: ERROR: deadlock detected when deleting an Organization
Product: Red Hat Satellite Reporter: Evgeni Golov <egolov>
Component: Organizations and LocationsAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Peter Dragun <pdragun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: pcreech
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.12.0.7-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:48:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Evgeni Golov 2019-07-03 12:32:57 UTC
From time to time, I see the following error in our nightly pipelines:

<pre>
not ok 1 Delete an Organization
# (in test file fb-destroy-organization.bats, line 15)
#   `hammer organization delete --name="${ORGANIZATION}"' failed with status 70
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 planned: 0.0/1, 0%, elapsed: 00:00:00
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 running: 0.021739130434782608/1, 2%, 0.0/s, elapsed: 00:00:02, ETA: 00:01:55
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 running: 0.16304347826086957/1, 16%, 0.0/s, elapsed: 00:00:05, ETA: 00:00:28
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 running: 0.2391304347826087/1, 23%, 0.0/s, elapsed: 00:00:07, ETA: 00:00:25
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 running: 0.32608695652173914/1, 32%, 0.0/s, elapsed: 00:00:09, ETA: 00:00:20
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 running: 0.4782608695652174/1, 47%, 0.0/s, elapsed: 00:00:12, ETA: 00:00:12
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 running: 0.6739130434782609/1, 67%, 0.0/s, elapsed: 00:00:14, ETA: 00:00:06
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 error: 0.75/1, 75%, 0.1/s, elapsed: 00:00:16, ETA: 00:00:04
# Task fdb90a4d-89fc-4509-9bee-b87f7fbb5e89 error: 0.75/1, 75%, 0.1/s, elapsed: 00:00:16, ETA: 00:00:04
# Error: PG::TRDeadlockDetected: ERROR:  deadlock detected
# DETAIL:  Process 20568 waits for ShareLock on transaction 18434; blocked by process 23406.
# Process 23406 waits for ShareLock on transaction 18406; blocked by process 20568.
# HINT:  See server log for query details.
# : DELETE FROM "katello_pool_products" WHERE "katello_pool_products"."id" = $1
</pre>

Comment 1 Evgeni Golov 2019-07-03 12:33:00 UTC
Created from redmine issue https://projects.theforeman.org/issues/26821

Comment 2 Evgeni Golov 2019-07-03 12:33:02 UTC
Upstream bug assigned to jsherril

Comment 5 Bryan Kearney 2019-07-03 14:02:52 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26821 has been resolved.

Comment 7 Peter Dragun 2019-08-26 13:00:15 UTC
Verified on Satellite 6.6 snap 17. Trying to reproduce bug by deleting multiple organizations. Everything works fine, no error occurred in logs.

Comment 8 Bryan Kearney 2019-10-22 19:48:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3172