[Opendnssec-user] ODS 2.0.1 did not start after reboot.

Petr Spacek pspacek at redhat.com
Tue Aug 30 09:03:17 UTC 2016


On 30.8.2016 10:12, Wytze van der Raay wrote:
> On 08/30/2016 09:46 AM, Fred.Zwarts wrote:
>> ODS 2.0.1 has now been running satisfactory on our test system for several
>> weeks. However, recently we noticed that each time we reboot the system,
>> ods does not startup properly. It turns out that after each reboot, the
>> directory /var/run/opendnssec has disappeared, so opendnssec can not start,
>> because it wants to create sock and pid files in this directory. I have
>> worked around this problem, by modifying /usr/local/sbin/ods-control, where
>> I added a mkdir for this directory just before the startup of the
>> enforcer.
>>
>> It is not clear to me how this directory disappears. The test system runs
>> SLES 12 SP1.
>>
>> I hope that this information helps to improve this software.
> 
> I recognize the problem ... we are running ODS 2.0.1 on OpenSUSE 13.2,
> which is presumably quite similar to SLES 12 SP1. The /var/run directory
> is a symbolic link to the /run directory. /run is created as tmpfs on
> every reboot, ie its content does not persist. This change has been made in
> SUSE and several other Linux distros to accomodate systemd, see for example
> http://www.h-online.com/open/news/item/Linux-distributions-to-include-run-directory-1219006.html
> for some background.
> 
> I *think* that if one uses a proper systemd script for starting/stopping ODS,
> it is possible to have the opendnssec directory created automatically more or
> less, but my current hack is to put a "mkdir -p /var/run/opendnssec" in its
> (oldfashioned init-style) startup script. The same issue exists with nsd,
> and I solved it in the same way.

"Proper systemd-way" is to use tmpfiles.d config file:
https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html

It allows to specify what directories and files should be re-created as
needed. I'm attaching config file which is shipped right now by Fedora 24.

It would be awesome if OpenDNSSEC could ship its tmpfiles.d config file
somewhere in contrib directory in source tree or so. It would allow all
systemd-based distros to use the proper config file instead of inventing own
buggy ones.

Petr Spacek  @  Red Hat


> In any case, this is not something that should be solved in
> /usr/local/sbin/ods-control, but rather in the distro-specific packaging scripts
> for ODS.
-------------- next part --------------
D /var/run/opendnssec 0755 ods ods -


More information about the Opendnssec-user mailing list