sys-fs/multipath-tools: Disable realtime scheduling for multipathd

Add a dropin that prevents the service from controlling its own
scheduling. On newer Flatcar releases, service ordering seems to have
changed and multipathd is able to configure realtime scheduling before
systemd tries (and fails) to enable the cpu controller.  The dropin is
meant to enforce sane behavior, and matches older Flatcar releases where
cpu controller was enabled before multipathd tries (and fails) to
configure realtime scheduling.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2024-03-18 16:37:23 +00:00
parent 0eb0bb38e8
commit 06e1575ad5

View File

@ -0,0 +1,13 @@
cros_post_src_install_add_dropin() {
mkdir -p "${D}$(systemd_get_systemunitdir)/multipathd.service.d"
cat <<EOF >"${D}$(systemd_get_systemunitdir)/multipathd.service.d/flatcar.conf"
[Service]
# Multipathd sets itself to sched_rr with highest priority.
# Cgroups2 doesn't support realtime processes outside the root cgroup,
# if any such process exists then cpu controller can't be enabled.
# This poses a bit of a dilemma.
# Block realtime control for the process, but give it highest non-rt priority.
RestrictRealtime=yes
Nice=-20
EOF
}