ansible icon indicating copy to clipboard operation
ansible copied to clipboard

fix: alertmanager deprecated PIDFile= path warning

Open atishaninov-xometry opened this issue 2 years ago • 3 comments

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.

atishaninov-xometry avatar Jul 11 '23 20:07 atishaninov-xometry

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.

gardar avatar Aug 16 '23 16:08 gardar

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.

atishaninov-xometry avatar Aug 16 '23 16:08 atishaninov-xometry

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 avatar Aug 30 '23 13:08 gardar

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

github-actions[bot] avatar Oct 17 '24 13:10 github-actions[bot]