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 1384086 - Deleting multiple content hosts can give deadlock in postgres
Summary: Deleting multiple content hosts can give deadlock in postgres
Keywords:
Status: CLOSED DUPLICATE of bug 1419985
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.2.2
Hardware: Unspecified
OS: Unspecified
high
high with 1 vote
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1122832 1426395
TreeView+ depends on / blocked
 
Reported: 2016-10-12 13:45 UTC by Peter Vreman
Modified: 2020-06-11 13:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1426395 (view as bug list)
Environment:
Last Closed: 2017-03-07 16:52:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Task content host destroy (24.08 KB, text/plain)
2016-10-12 13:45 UTC, Peter Vreman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 12556 0 None None None 2016-10-19 16:01:59 UTC
Red Hat Knowledge Base (Solution) 2858931 0 None None None 2017-01-13 15:05:14 UTC

Description Peter Vreman 2016-10-12 13:45:19 UTC
Created attachment 1209620 [details]
Task content host destroy

Description of problem:
Bulk deleting content hosts can trigger a deadlock in postgres.
See attached task export that it deadlocks on the import_data to update the katello_pools.


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


How reproducible:


Steps to Reproduce:
1. Register 100 Content Hosts
2. Bulk Delete 100 Content Hosts
3.

Actual results:
Deadlock

Expected results:
Success

Additional info:
In the latest upstream the https://github.com/Katello/katello/pull/6187 removes already the finalize() code block that does the import_data() call.

Comment 2 Brad Buckingham 2016-10-14 17:46:38 UTC
Peter, thank you for filing the bugzilla.

Justin, will the PR that Peter has referenced resolve the deadlock observed?

Comment 3 Justin Sherrill 2016-10-17 00:17:06 UTC
Indeed it does.  We likely could backport *just* the piece that would fix it if we want to pull this into 6.2.z

Comment 4 Chris Roberts 2016-10-19 15:20:44 UTC
http://projects.theforeman.org/issues/12556

Comment 5 Peter Vreman 2016-10-21 11:36:07 UTC
This is not just bulk deleting also with re-registering hosts the deadlock is triggered.

E.g. re-register (susbcription-manager register --force) on 10 hosts at the same time.

Comment 7 Satellite Program 2017-02-23 21:09:42 UTC
Please add verifications steps for this bug to help QE verify

Comment 8 Justin Sherrill 2017-03-07 16:52:36 UTC

*** This bug has been marked as a duplicate of bug 1419985 ***

Comment 9 Justin Sherrill 2017-03-07 16:53:48 UTC
closed as a duplicate as https://bugzilla.redhat.com/show_bug.cgi?id=1419985 already has the single fix we need and not the GIANT upstream change that happened to include it.


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