Bug 1713023

Summary: sbd is unable to set rt-priority if CPUAccounting is enabled
Product: Red Hat Enterprise Linux 7 Reporter: Klaus Wenninger <kwenning>
Component: sbdAssignee: Klaus Wenninger <kwenning>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.7CC: cfeist, cluster-maint, cluster-qe, mlisik, mmazoure, sbradley
Target Milestone: rc   
Target Release: 7.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sbd-1.4.0-15.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1713021
: 1715136 (view as bug list) Environment:
Last Closed: 2020-03-31 19:09:21 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:
Bug Depends On: 1713021, 1715134    
Bug Blocks: 1715136    

Description Klaus Wenninger 2019-05-22 17:20:07 UTC
+++ This bug was initially created as a clone of Bug #1713021 +++

Description of problem:

If CPUAccounting is enabled sbd isn't able to set rt-priority for its processes.


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

1.3.1-18.el8


How reproducible:

100%

Steps to Reproduce:
1. Setup a cluster that uses sbd
2. Prior to starting cluster on one node (corosync and sbd still down) issue:
   'systemctl --runtime set-property system.slice CPUAccounting=true'
3. systemctl start pacemaker

Actual results:

'systemctl status sbd' prints
...
May 22 18:48:15 node4 sbd[2398]:    error: sbd_make_realtime: Unable to set scheduler priority to 99: Operation not permitted (1)
...

Using top or ps one can as well verify that the sbd-processes aren't rt scheduled.


Expected results:

sbd-processes should be rt-schedules as expected.

[root@node2 ~]# top -b|grep sbd
 1218 root      rt   0  126332  19952  18192 S   0.0   1.1   0:00.00 sbd
 1219 root      rt   0  142116  33448  29580 S   0.0   1.8   0:00.15 sbd
 1220 root      rt   0  142616  35992  30600 S   0.0   2.0   0:00.02 sbd


Additional info:

Amongst those components that enable CPUAccounting are e.g.
Red Hat Insights, Docker, ...

--- Additional comment from Klaus Wenninger on 2019-05-22 17:19:09 UTC ---

This could as well be assigned to e.g. systemd or another basic configuration component.
The discussion of this topic is controversial and it doesn't look as if there would be a clean and easy to access solution anytime soon.
Corosync meanwhile has gone a slightly hacky approach for the same problem.
This it probably makes sense to target a similar implementation in sbd as well to first have a solution that doesn't require additional configuration and to be consistent within the cluster-suite.

Comment 4 Klaus Wenninger 2019-07-17 12:57:58 UTC
Solution is available upstream
https://github.com/ClusterLabs/sbd/commit/eaeed6cca46a0223617ead834aaa576dd5ad07ff

Comment 6 Klaus Wenninger 2019-08-16 08:54:46 UTC
There seem to be issue with kernel
Linux node2 3.10.0-1059.el7.x86_64 #1 SMP Thu Jun 27 14:36:56 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Comment 7 Klaus Wenninger 2019-08-16 09:25:15 UTC
Sorry tested with the wrong rpm - sbd-1.4.0-14.el7 is fine.

Comment 10 errata-xmlrpc 2020-03-31 19:09:21 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/RHBA-2020:0995