frr icon indicating copy to clipboard operation
frr copied to clipboard

Shipped systemd unit uses deprecated path in PIDFile

Open SRv6d opened this issue 1 year ago • 2 comments

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

  • [X] I have searched the open issues for this bug.
  • [X] I have not included sensitive information in this report.

SRv6d avatar Oct 08 '24 09:10 SRv6d

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

donaldsharp avatar Oct 08 '24 22:10 donaldsharp

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

SRv6d avatar Oct 09 '24 10:10 SRv6d

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar Apr 08 '25 02:04 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar Apr 08 '25 02:04 frrbot[bot]