Hi Cameron,

Sorry it took me so much time to reply. I've just now fixed my local
discardable VM setup for testing so I'm able to dive in again.

On Tue, 11 Feb 2020 11:23:19 +1000 Cameron Davidson
<b...@davidsoncj.id.au> wrote:
> This has just started hapenning to my also.
> 
> The cause, I think, that evenutally a tmpfile cleanup will delete
> /run/smokeping - maybe depends on age and/or  because it is not owned by
> root.

This is very strange.. As I've mentioned earlier in this bug report, the
systemd unit file should have a directive (RuntimeDirectory) that
automatically creates the directory /run/smokeping.
I've just verified and the sysvinit script also does create the
directory (albeit under /var/run, but that should be equivalent since
/var/run can be expected to symlink to /run).

Something that I've just discovered today though is that systemd
completely destroys the /run/smokeping directory when the service is
stopped. So this might throw some ppl off (myself included!) when trying
to debug this.


maybe one thing that might be interesting to verify is whether the
configuration file points to the right directory for "piddir". In the
default configuration that the package ships, the file
/etc/smokeping/config.d/pathnames contains the following:


root@debian-10-amd64:~# cat /etc/smokeping/config.d/pathnames
sendmail = /usr/sbin/sendmail
imgcache = /var/cache/smokeping/images
imgurl   = ../smokeping/images
datadir  = /var/lib/smokeping
piddir  = /var/run/smokeping
smokemail = /etc/smokeping/smokemail
tmail = /etc/smokeping/tmail
dyndir = /var/lib/smokeping/__cgi


check in this file if "piddir" points either to /var/run/smokeping or
/run/smokeping, otherwise try and correct the path.


and finally as I mentioned earlier, if smokeping is running in "slave"
mode, then --pid-dir behaves differently : it does not create a pid file
for some reason. if you're running smokeping using this mode, then take
a look at the example file I've added to the package:

/usr/share/doc/smokeping/examples/systemd/slave_mode.conf

this can be copied in a systemd override directory and then adapted for
the master url. the file contains some instructions in comments for
where to place it.

> One solution (I found for other systemd processes run as non-root) is to
> add a config file:
> 
> /usr/lib/tmpfiles.d/smokeping.conf
> 
> Contents should be something like:
> 
>        d    /run/smokeping   0755   smokeping   smokeping   -   -
> 
> to have systemd recreate the dir when smokeping is started.

I believe this should be non-necessary since both the init script and
the systemd units have some method to automatically create the directory.


If you're still unable to get the pid file to be created by systemd,
then maybe I'm missing something out. In this case, tell me a bit more
information about your system. e.g. what CPU architecture is being used
(amd64, arm64, i386, ...) and what version of systemd your system
currently has installed.


Cheers!

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to