radvd unit still references /var/run for pidfile

Bug #1835446 reported by Michael Griego
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
radvd (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Package: radvd

$ lsb_release -rd
Description: Ubuntu 19.04
Release: 19.04

$ apt-cache policy radvd
radvd:
  Installed: 1:2.17-2
  Candidate: 1:2.17-2
  Version table:
 *** 1:2.17-2 500
        500 http://us.archive.ubuntu.com/ubuntu disco/main amd64 Packages
        100 /var/lib/dpkg/status

The systemd service hasn't yet been updated to move the pidfile from /var/run to /run. This is causing a service startup failure in 19.04 with the following error logged:

/lib/systemd/system/radvd.service:11: PIDFile= references path below legacy directory /var/run/, updating /var/run/radvd.pid → /run/radvd.pid; please update the unit file accordingly.

I was able to fix this locally by applying the following override via "systemctl edit radvd.service":

[Service]
PIDFile=/run/radvd.pid

I'm happy to submit a patch for this, but I'm not sure which file is the appropriate one to set the PATH_RADVD_PID build variable in the ubuntu package.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thank you for your report Michael,

The issue this report is about is present in Debian too. Ubuntu doesn't normally make any changes over the Debian in development releases but syncs them, so this bug would be best fixed directly in Debian, and then Ubuntu will pick up the fix automatically.
For SRUs [1] we obviously tkae changes but that pre-reqs the fix in the latest release.

I'm going to report this bug against the Debian radvd package and link this report to the Debian bug.

it seems this service has a few more issues - it fails after install (bad/no default conf) it is disabled by default (no start on reboot), ...
I'll ping a few people to look after it in general as I think this has been neglected for a while. They can then decide if we want to start taking a bunch of Deltas right now or to massively contribute to Debian or ...

[1]: https://wiki.ubuntu.com/StableReleaseUpdates

Changed in radvd (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Doing some checks before reporting...

1:2.16-3 and 1:2.17-2 still list the path with /var (man page):
   -p pidfile, --pidfile pidfile
      Specifies an alternate pidfile. Normally the compiled in default /var/run/radvd.pid is used.

The path isn't overwritten in the systemd service either.

Using the most trivial radvd.conf imaginable
# cat /etc/radvd.conf
interface foo {
  IgnoreIfMissing on;
};

The service works fine.
root@e:~# systemctl status radvd
● radvd.service - Router advertisement daemon for IPv6
   Loaded: loaded (/lib/systemd/system/radvd.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-07-05 07:54:59 UTC; 2s ago
     Docs: man:radvd(8)
  Process: 12726 ExecStartPre=/usr/sbin/radvd --logmethod stderr_clean --configtest (code=exited, status=0/SUCCESS)
  Process: 12727 ExecStart=/usr/sbin/radvd --logmethod stderr_clean (code=exited, status=0/SUCCESS)
 Main PID: 12728 (radvd)
    Tasks: 2 (limit: 4915)
   Memory: 1000.0K
   CGroup: /system.slice/radvd.service
           ├─12728 /usr/sbin/radvd --logmethod stderr_clean
           └─12729 /usr/sbin/radvd --logmethod stderr_clean

And through the compat mapping for /var/run the pid still works:
ll /var/run /var/run/radvd.pid
lrwxrwxrwx 1 root root 4 Jun 23 07:52 /var/run -> /run/
-rw-r--r-- 1 root root 6 Jul 5 07:54 /var/run/radvd.pid
$ cat /var/run/radvd.pid
12728

Is in your case the compat mapping via the symlink missing/broken?

P.S. I'm still pinging people to take a look after radvd in general ...

Changed in radvd (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Michael Griego (mgriego) wrote :

The compat mapping is present. I should have clarified that the behavior didn't manifest itself until a system restart. The first time I started up the service with a valid config, it ran. After I rebooted the system, the service no longer came up and presented with the error message I included above.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Hello Michael,

One thing I have noticed about this:

(c)inaddy@temp:~$ systemctl status radvd
● radvd.service - Router advertisement daemon for IPv6
   Loaded: loaded (/lib/systemd/system/radvd.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:radvd(8)

Jul 08 15:49:06 temp systemd[1]: Starting Router advertisement daemon for IPv6...
Jul 08 15:49:07 temp radvd[1928]: config file, /etc/radvd.conf, syntax ok
Jul 08 15:49:07 temp radvd[1929]: version 2.17 started
Jul 08 15:49:07 temp radvd[1929]: IPv6 forwarding setting is: 0, should be 1 or 2
Jul 08 15:49:07 temp radvd[1929]: IPv6 forwarding seems to be disabled, but continuing anyway
Jul 08 15:49:07 temp systemd[1]: Started Router advertisement daemon for IPv6.
Jul 08 15:49:09 temp systemd[1]: Stopping Router advertisement daemon for IPv6...
Jul 08 15:49:09 temp systemd[1]: radvd.service: Succeeded.
Jul 08 15:49:09 temp systemd[1]: Stopped Router advertisement daemon for IPv6.
Jul 08 15:49:20 temp systemd[1]: /lib/systemd/system/radvd.service:11: PIDFile= references path below legacy directory /var/run/, upd

After the reboot, the service is NOT enabled by default, likely because of missing radvd.conf file in /etc. What you are seeing is just a deprecated warning message (15:49:20) after reboot, but I was able to manually start my service after reboot.

The real issue here could be not having radvd.conf file created by default, at least a simple one like this:

interface eth0
{
   AdvSendAdvert on;
   prefix 2001:db8::/64
   {
   };
};

And, possibly, the installation would enable radvd.service by default. In the second boot I have enabled radvd and after a new reboot it goot started automatically:

● radvd.service - Router advertisement daemon for IPv6
   Loaded: loaded (/lib/systemd/system/radvd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-07-08 15:53:05 UTC; 35s ago
     Docs: man:radvd(8)
  Process: 244 ExecStartPre=/usr/sbin/radvd --logmethod stderr_clean --configtest (code=exited, status=0/SUCCESS)
  Process: 350 ExecStart=/usr/sbin/radvd --logmethod stderr_clean (code=exited, status=0/SUCCESS)
 Main PID: 354 (radvd)
    Tasks: 2 (limit: 4915)
   Memory: 1.3M
   CGroup: /system.slice/radvd.service
           ├─354 /usr/sbin/radvd --logmethod stderr_clean
           └─355 /usr/sbin/radvd --logmethod stderr_clean

Jul 08 15:53:05 temp systemd[1]: Starting Router advertisement daemon for IPv6...
Jul 08 15:53:05 temp radvd[244]: config file, /etc/radvd.conf, syntax ok
Jul 08 15:53:05 temp radvd[350]: version 2.17 started
Jul 08 15:53:05 temp radvd[350]: IPv6 forwarding setting is: 0, should be 1 or 2
Jul 08 15:53:05 temp radvd[350]: IPv6 forwarding seems to be disabled, but continuing anyway
Jul 08 15:53:05 temp systemd[1]: Started Router advertisement daemon for IPv6.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Could you please provide me the EXACT steps you're executing so we can reproduce exactly what is going on in your system ? The only thing I could find is this "missing config file" by default and "enabling service by default" <- which we could address in this bug, unless you have something else.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for radvd (Ubuntu) because there has been no activity for 60 days.]

Changed in radvd (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.