Bug 1480367
Summary: | [5.7] rhn_server.snapshot_server deadlock on Activation Key path | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Shannon Hughes <shughes> | ||||
Component: | Server | Assignee: | Jan Dobes <jdobes> | ||||
Status: | CLOSED ERRATA | QA Contact: | Jan HutaĆ <jhutar> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 570 | CC: | cshereme, ggainey, jdobes, jhutar, tlestach, xdmoon | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | spacewalk-schema-2.3.2-35 satellite-schema-5.7.0.37-1 spacewalk-backend-2.3.3-55 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1481848 (view as bug list) | Environment: | |||||
Last Closed: | 2017-12-13 07:56:42 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1481848, 1482563 | ||||||
Attachments: |
|
Description
Shannon Hughes
2017-08-10 20:11:55 UTC
Created attachment 1311903 [details]
Replacement for the postgresql lock_counts() proc
After a lot of digging, it appears that the act of storing a server-snapshot is locking rows in rhnservergroup as a side-effect. This caused DB locks to be acquired out-of-order, and hence the deadlock.
This file adds the rhnSnapshotServerGroup to the list of locks managed by lock_counts(), and enforces lock-acquisition in the right order. It should address the deadlocks between snapshot_server() and entitle_server()
Apply by downloading lock_counts.sql onto the Sat5 instance, and running the foolowing command:
# spacewalk-sql --select-mode lock_counts.sql
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/RHBA-2017:3443 |