mirror_corosync/exec
Jan Friesse c9996fdd0f main: Add support for cgroup v2 and auto mode
Support for cgroup v2 is very similar to cgroup v1 just checking (and
writing) different file.

Because of all the problems described later with cgroup v2 new "auto"
mode (new default) is added. This mode first tries to set rr scheduling
and moves Corosync to root cgroup only if it fails.

Testing this feature is a bit harder than with cgroup v1 so it's
probably worh noting in this commit message.

1. Copy some service file (I've used httpd service) and set
   CPUQuota=30% in the [service] section.
2. Check /sys/fs/cgroup/cgroup.subtree_control - there should be no
   "cpu"
3. Start modified service
4. Check /sys/fs/cgroup/cgroup.subtree_control - there should be "cpu"
5. Start corosync - It should be able to get rt priority

When move_to_root_cgroup is disabled (applies only for kernels
with CONFIG_RT_GROUP_SCHED enabled), behavior differs:
- If corosync is started before modified service, so
  there is no "cpu" in /sys/fs/cgroup/cgroup.subtree_control
  corosync starts without problem and gets rt priority.
  Starting modified service later will never add "cpu" into
  /sys/fs/cgroup/cgroup.subtree_control (because corosync is holding
  rt priority and it is placed in the non-root cgroup by systemd).

- When corosync is started after modified service, so "cpu"
  is in /sys/fs/cgroup/cgroup.subtree_control, corosync is not
  able to get RT priority.

It's worth noting problems when cgroup v2 is used together with systemd
logging described in corosync.conf(5) man page.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2021-07-23 15:31:52 +02:00
..
.gitignore Add .gitignore files. 2010-10-21 07:43:46 -07:00
apidef.c CFG: Remove ring-reenable code 2017-08-03 14:32:02 +02:00
apidef.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
cfg.c cfg: corosync_cfg_trackstop blocks forever 2021-05-19 18:28:45 +02:00
cmap.c cmap: Assert copied string length 2019-11-28 09:44:44 +01:00
coroparse.c main: Add support for cgroup v2 and auto mode 2021-07-23 15:31:52 +02:00
cpg.c cpg: Change downlist log level 2020-01-09 12:40:32 +01:00
cs_queue.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
fsm.h Make logging of WD and MON service correct 2012-08-16 14:45:15 +02:00
icmap.c icmap: icmap_init_r() leaks if trie_create() fails 2020-03-26 14:42:41 +01:00
ipc_glue.c main: Move sched paramaters to config file 2018-11-15 17:30:03 +01:00
ipcs_stats.h stats: Add cmap key to clear the various stats. 2017-10-31 17:39:14 +01:00
logconfig.c logconfig: Remove double free of value 2019-11-28 09:44:44 +01:00
logconfig.h list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
logsys.c logsys: Support hires timestamp 2018-10-29 17:45:29 +01:00
main.c main: Add support for cgroup v2 and auto mode 2021-07-23 15:31:52 +02:00
main.h main: Replace COROSYNC_MAIN_CONFIG_FILE 2018-11-15 17:30:14 +01:00
Makefile.am nozzle: Add support for libnozzle devices 2019-02-26 13:11:35 +01:00
mon.c list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
pload.c build: bring SOLARIS up to the same standard as other OSes 2012-08-30 15:00:27 +02:00
quorum.c Remove redundant header file inclusion 2016-12-05 09:59:08 +01:00
quorum.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
schedwrk.c schedwrk: Cleanup and make it work on PPC BE 2016-05-17 16:29:25 +02:00
schedwrk.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
service.c service: Fix memleak in service_unlink_and_exit 2013-06-21 11:21:29 +02:00
service.h service: remove leftovers from mt corosync 2012-08-09 15:10:16 +02:00
stats.c stats: fix crash when iterating over deleted keys 2021-06-03 10:14:47 +02:00
stats.h stats: Add stats for scheduler misses 2020-01-22 17:06:10 +01:00
sync.c sync: Assert sync_callbacks.name length 2019-11-28 09:44:44 +01:00
sync.h sync: kill evil and syncv1 in one shot 2012-03-09 11:15:08 +01:00
timer.c Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
timer.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
totemconfig.c totemconfig: Ensure strncpy is always terminated 2021-04-14 18:07:50 +02:00
totemconfig.h config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totemip.c Revert "totemip: compare sin6_scope_id and interface_num" 2020-04-22 13:30:36 +02:00
totemknet.c knet: pass correct handle to knet_handle_compress 2021-04-06 11:08:28 +02:00
totemknet.h cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemnet.c cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemnet.h cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totempg.c cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemsrp.c cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemsrp.h cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemudp.c cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemudp.h cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemudpu.c cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
totemudpu.h cfg: New API to get extended node/link infomation 2020-11-26 16:15:50 +01:00
util.c config: Properly check crypto and compress models 2021-04-14 18:07:20 +02:00
util.h config: Properly check crypto and compress models 2021-04-14 18:07:20 +02:00
votequorum.c config: don't reload vquorum if reload fails 2020-04-24 16:27:01 +02:00
votequorum.h list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
vsf_quorum.c quorum: Add support for nodelist callback 2020-10-12 13:22:11 +02:00
vsf_ykd.c YKD: Fix loading of YKD quorum module 2014-08-18 09:33:59 +01:00
vsf_ykd.h list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
vsf.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
wd.c wd: fix snprintf warnings 2017-12-01 17:23:54 +01:00