Bug 1402933

Summary: [5.7] lock_counts fix has several issues
Product: Red Hat Satellite 5 Reporter: Grant Gainey <ggainey>
Component: ServerAssignee: Grant Gainey <ggainey>
Status: CLOSED ERRATA QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: urgent    
Version: 570CC: jhutar, rdrazny, satqe-list, shughes, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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:
Story Points: ---
Clone Of: 1402931 Environment:
Last Closed: 2017-02-01 15:55:52 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: 1402931, 1402935    
Bug Blocks: 465198    
Attachments:
Description Flags
lock_counts.ora 'for update' none

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