RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1713021 - sbd is unable to set rt-priority if CPUAccounting is enabled
Summary: sbd is unable to set rt-priority if CPUAccounting is enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sbd
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.1
Assignee: Klaus Wenninger
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1713023 1715134 1715136
TreeView+ depends on / blocked
 
Reported: 2019-05-22 17:12 UTC by Klaus Wenninger
Modified: 2020-09-21 08:27 UTC (History)
5 users (show)

Fixed In Version: sbd-1.4.0-8.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1713023 1715134 (view as bug list)
Environment:
Last Closed: 2019-11-05 20:46:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3770681 0 None None None 2020-08-20 14:54:25 UTC
Red Hat Product Errata RHBA-2019:3344 0 None None None 2019-11-05 20:46:55 UTC

Description Klaus Wenninger 2019-05-22 17:12:12 UTC
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, ...

Comment 1 Klaus Wenninger 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 3 Klaus Wenninger 2019-05-29 16:53:34 UTC
Guess I've found a viable extension to the way how corosync is tackling the issue atm
that should be more compatible with the current behaviour especially in cases
where a setup has already introduced something like a realtime.slice that already
has some rt-budget assigned.
Configuration for it will reside in /etc/sysconfig/sbd:

## Type: yesno / auto
## Default: auto
#
# If CPUAccounting is enabled default is not to assign any RT-budget
# to the system.slice which prevents sbd from running RR-scheduled.
#
# One way to escape that issue is to move sbd-processes from the
# slice they were originally started to root-slice.
# Of course starting sbd in a certain slice might be intentional.
# Thus in auto-mode sbd will check if the slice has RT-budget assigned.
# If that is the case sbd will stay in that slice while it will
# be moved to root-slice otherwise.
SBD_MOVE_TO_ROOT_CGROUP=auto

As selinux-rules are quite fine-grained with sbd there are some
additions to the rules required:

For moving to root-slice sbd will need ro access to

- /sys/fs/cgroup/cpu/cpu.rt_runtime_us 

and write access to

- /sys/fs/cgroup/cpu/tasks.

For checks needed for the auto-mode additional ro access
is required for

- /proc/${pid}/cgroup

and

- /sys/fs/cgroup/cpu/${slice}/cpu.rt_runtime_us

Comment 4 Klaus Wenninger 2019-06-03 14:10:52 UTC
https://github.com/ClusterLabs/sbd/pull/82

Comment 8 errata-xmlrpc 2019-11-05 20:46:42 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-2019:3344


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