Bug 1402933 - [5.7] lock_counts fix has several issues
Summary: [5.7] lock_counts fix has several issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 570
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 1402931 1402935
Blocks: 465198
TreeView+ depends on / blocked
 
Reported: 2016-12-08 16:33 UTC by Grant Gainey
Modified: 2020-03-11 15:28 UTC (History)
5 users (show)

Fixed In Version: satellite-schema-5.7.0.27-1 spacewalk-schema-2.3.2-30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1402931
Environment:
Last Closed: 2017-02-01 15:55:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
lock_counts.ora 'for update' (549 bytes, patch)
2016-12-08 20:22 UTC, Grant Gainey
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0236 0 normal SHIPPED_LIVE Satellite 5.7 bug fix update 2017-02-01 20:55:02 UTC

Description Grant Gainey 2016-12-08 16:33:34 UTC
+++ This bug was initially created as a clone of Bug #1402931 +++

Description of problem:

The Oracle version of lock_counts.pkb fails to lock the server-row 'for update', which kind of defeats the whole purpose iof the proc.  Fix this.

Comment 1 Grant Gainey 2016-12-08 20:22:18 UTC
Created attachment 1229606 [details]
lock_counts.ora 'for update'

lock_counts needs to have 'for update' added to the ORA version, to correctly lock the server-row

Comment 4 Grant Gainey 2016-12-16 20:38:41 UTC
There is a further hole in the erratum that released lock_counts - specifically, the unsubscribe_server path WAS NOT COVERED, in either postgresql or oracle.

This is fixed in rhn_channel.pkb in both dialects.

Comment 6 Radovan Drazny 2017-01-04 18:18:03 UTC
Tested on both Oracle and Postgresql with satellite-schema-5.7.0.27-1-sat using the reproducer scripts from BZ 1388160. After upgrade, there are no deadlocks anymore.

VERIFIED

Comment 13 errata-xmlrpc 2017-02-01 15:55:52 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://rhn.redhat.com/errata/RHBA-2017-0236.html


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