FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.32k stars 1.25k forks source link

Shipped systemd unit uses deprecated path in PIDFile #17032

Open SRv6d opened 1 week ago

SRv6d commented 1 week ago

Description

The systemd unit file shipped with FRRouting uses a deprecated path in it's PIDFile directive, causing systemd to to log the following error:

/usr/lib/systemd/system/frr.service:20: PIDFile= references a path below legacy directory /var/run/, updating /var/run/frr/watchfrr.pid → /run/frr/watchfrr.pid; please update the unit file accordingly.

Version

FRRouting 10.1.1 on Linux(5.14.0-427.18.1.el9_4.x86_64).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
    '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sbindir=/usr/lib/frr' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-static' '--disable-werror' '--enable-multipath=256' '--enable-vtysh' '--enable-ospfclient' '--enable-ospfapi' '--enable-rtadv' '--enable-ldpd' '--enable-pimd' '--enable-pim6d' '--enable-pbrd' '--enable-nhrpd' '--enable-eigrpd' '--enable-babeld' '--enable-vrrpd' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-fpm' '--enable-watchfrr' '--disable-bgp-vnc' '--enable-isisd' '--enable-rpki' '--enable-bfdd' '--enable-pathd' '--enable-snmp' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' 'CC=gcc' 'CXX=g++' 'LT_SYS_LIBRARY_PATH=/usr/lib64:'

How to reproduce

Install FRRouting from the provided repos.

Expected behavior

Don't use deprecated paths.

Actual behavior

systemd error:

/usr/lib/systemd/system/frr.service:20: PIDFile= references a path below legacy directory /var/run/, updating /var/run/frr/watchfrr.pid → /run/frr/watchfrr.pid; please update the unit file accordingly.

Additional context

No response

Checklist

donaldsharp commented 1 week ago

The path generated is selected by the operators configure statement, here's our line in the frr.service: PIDFile=@e_frr_runstatedir@/watchfrr.pid

This is generated from the configure.ac option of --local-state-dir=XXX.

Since I have absolutely no idea where you got your frr packaging I cannot comment on whether or not how it got a localstatedir = /var setting

SRv6d commented 1 week ago

Like mentioned in the issue, FRR is installed from the provided repositories, specifically https://rpm.frrouting.org/repo/frr-stable-repo-1-0.el8.noarch.rpm on Rocky Linux 9.4, the same goes for the Debian stable repositories though.

I made a cursory attempt at finding where that setting is defined but I only found some comments indicating what it is set to.

tools/frrcommon.sh.in
26:V_PATH="@e_frr_runstatedir@${suffix}" # /var/run/frr

tools/frr.in
19:V_PATH="@e_frr_runstatedir@" # /var/run/frr