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

fix: alertmanager deprecated PIDFile= path warning #155

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

atishaninov-xometry
Copy link
Contributor

Starting from systemd 239 (commit link), it started showing warning about using deprecated path to pidfile in /var/run instead of /run.

This warning can be seen by launching command systemctl status alertmanager or sometring like journalctl -xeu alertmanager:

/etc/systemd/system/alertmanager.service:12: PIDFile= references a path below legacy directory /var/run/, updating /var/run/alertmanager.pid → /run/alertmanager.pid; please update the unit file accordingly.

Signed-off-by: Anatoliy Tishaninov <atishaninov@xometry.de>
@gardar
Copy link
Member

gardar commented Aug 16, 2023

Thanks!
Do you know if using /run/alertmanager.pid will cause issues on versions older than 239? Wondering if we could just use /run/ for all versions.

@atishaninov-xometry
Copy link
Contributor Author

As far as i know, /run directory exists on systemd-based systems from 2011: https://lwn.net/Articles/436012/
Since introduction of /run, many distros implemented bind-mounting /var/run to /run or vice versa for compatibility.
I think it's safe to use /run for all supported distros.

@gardar
Copy link
Member

gardar commented Aug 30, 2023

As far as i know, /run directory exists on systemd-based systems from 2011: https://lwn.net/Articles/436012/ Since introduction of /run, many distros implemented bind-mounting /var/run to /run or vice versa for compatibility. I think it's safe to use /run for all supported distros.

Sounds good, do you mind changing it to /run/ for all versions then?
Thanks.

@gardar gardar merged commit cc205a3 into prometheus-community:main Oct 17, 2024
Copy link
Contributor

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and the docs are now incorporated into main:
https://prometheus-community.github.io/ansible/branch/main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants