Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524000 - net-misc/radvd-2.5 - /var/run/radvd is not created with proper permissions via tmpfiles.d / radvd.service: option LimitNOFSIZE=0 is not supported
Summary: net-misc/radvd-2.5 - /var/run/radvd is not created with proper permissions vi...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 09:32 UTC by Pavel Volkov
Modified: 2014-10-10 14:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Volkov 2014-09-29 09:32:37 UTC
The first problem is that directory /var/run/radvd is not created with proper permissions via tmpfiles.d.
Before starting the systemd service radvd.service (radvd daemon running with radvd user permissions) directory /var/run/radvd has to be created using tmpfiles.d functionality.
Otherwise, starting the service fails due to insufficient permissions to write the PID.

Second problem is with the file radvd.service:

[Unit]
Description=Router advertisement daemon for IPv6
Documentation=man:radvd(8)
After=network.target

[Service]
Type=simple
ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 1
ExecReload=/usr/sbin/radvd --configtest ; \
           /bin/kill -HUP $MAINPID
CPUSchedulingPolicy=idle
LimitNOFSIZE=0

[Install]
WantedBy=multi-user.target

Option LimitNOFSIZE=0 is not supported and systemd prints error messages about that.
Next, it does not work with Type=simple, it should be Type=forking and PIDFile=/var/run/radvd/radvd.pid should be set.

Reproducible: Always

Steps to Reproduce:
systemctl start radvd

Actual Results:  
 9月 29 12:06:39 melforce radvd[6302]: [Sep 29 12:06:39] radvd (6302): Unable to open pid file, /var/run/radvd/radvd.pid: No such file or directory
 9月 29 12:06:39 melforce systemd[1]: radvd.service: main process exited, code=exited, status=255/n/a
 9月 29 12:06:39 melforce systemd[1]: Unit radvd.service entered failed state.
Comment 1 Michael Weber (RETIRED) gentoo-dev 2014-10-10 14:27:51 UTC
I've added a tmpfiles.d config and made these changes to radvd.service ...

Index: files/radvd.service
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.service,v
retrieving revision 1.1
diff -u -B -r1.1 radvd.service
--- files/radvd.service 23 Nov 2012 22:12:21 -0000      1.1
+++ files/radvd.service 10 Oct 2014 14:21:52 -0000
@@ -4,12 +4,12 @@
 After=network.target
 
 [Service]
-Type=simple
+Type=forking
 ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 1
 ExecReload=/usr/sbin/radvd --configtest ; \
            /bin/kill -HUP $MAINPID
 CPUSchedulingPolicy=idle
-LimitNOFSIZE=0
+PIDFile=/run/radvd/radvd.pid
 
 [Install]
 WantedBy=multi-user.target

With /run instead of /var/run, is this correct now? I cannot test systemd stuff.

+*radvd-2.8 (10 Oct 2014)
+
+  10 Oct 2014; Michael Weber <xmw@gentoo.org> +files/radvd.tmpfilesd,
+  +radvd-2.8.ebuild, -radvd-2.3.ebuild, files/radvd.service:
+  Version bump (bug 524312), address systemd issues (bug 524000).
+