oomd: stop monitoring user-*.slice slices

... (rhbz#2177722)

Oomd was killing a login session (user-*.slice/session-*.scope).

Quoting https://bugzilla.redhat.com/show_bug.cgi?id=2177722#c21:

> In F37 and prior the config was killing based on swap and pressure
> on user-*.slice/user@.service. In 7665e1796f
> it was changed to pressure only on system.slice and all slices under
> user.slice. The relevant point here is that this change now includes
> user-*.slice/session-*.scope which is the critical session bits
> you're seeing killed here.
>
> That session scope should be omitted. The config that I intended
> with the initial PR was for all slices under
> user.slice/user-*.slice/user@.service to be monitored, not for all
> slices under user.slice.

With the file removed:

$ oomctl | rg Path | sort
  Path: /system.slice
  Path: /user.slice/user-1000.slice/user@1000.service/app.slice
  Path: /user.slice/user-1000.slice/user@1000.service/session.slice
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-03-29 18:09:36 +02:00
parent 1a6178ce6e
commit 1320fc3009

View File

@ -770,7 +770,6 @@ install -D -t %{buildroot}/usr/lib/systemd/ %{SOURCE3}
# systemd-oomd default configuration
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/oomd.conf.d/ %{SOURCE14}
install -Dm0644 -t %{buildroot}%{system_unit_dir}/user-.slice.d/ %{SOURCE15}
install -Dm0644 -t %{buildroot}%{system_unit_dir}/system.slice.d/ %{SOURCE15}
install -Dm0644 -t %{buildroot}%{user_unit_dir}/slice.d/ %{SOURCE15}
# https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer