Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

earlyoom.service: add Conflicts #306

Closed
wants to merge 1 commit into from
Closed

earlyoom.service: add Conflicts #306

wants to merge 1 commit into from

Conversation

yangfl
Copy link
Contributor

@yangfl yangfl commented Feb 8, 2024

Some distros default to systemd oom handling. Mark systemd unit conflict with other oom handlers to prevent incompatibility.

Copy link

@Mikaela Mikaela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least on my quick testing with similar drop-in config on Fedora 39 and 40, not including the socket as a conflict caused systemd-oomd.service to be constantly started and stopped every few seconds.

I am not sure if I had manually enabled either or not, but I think better safe than sorry.

@@ -1,6 +1,7 @@
[Unit]
Description=Early OOM Daemon
Documentation=man:earlyoom(1) https://github.com/rfjakob/earlyoom
Conflicts=systemd-oomd.service nohang.service oomd.service

This comment was marked as resolved.

@hakavlad
Copy link
Contributor

missing nohang-desktop.service

Some distros default to systemd oom handling. Mark systemd unit
conflict with other oom handlers to prevent incompatibility.
@hakavlad
Copy link
Contributor

hakavlad commented Feb 26, 2024

IMHO 'Conflicts' option creates unexpected behavior when starting one service stops another. But I don't know which solution is optimal.

@hakavlad
Copy link
Contributor

conflict with other oom handlers to prevent incompatibility.

This is not necessarily incompatibility: just one killer will work before the other.

@rfjakob
Copy link
Owner

rfjakob commented Feb 28, 2024

Yeah, not sure about this. Having multiple oom handlers is strange, but can still work.

A warning would be enough. Is there a way to have systemd warn about it but not prevent it?

@rfjakob rfjakob closed this Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants