Bug 1349 - allow suppression of pidfiles
allow suppression of pidfiles
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
unspecified
x86_64 Linux
: P5 enhancement
Assigned To: unbound team
https://github.com/NLnetLabs/unbound/...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-14 21:57 CEST by Daniel Kahn Gillmor
Modified: 2017-07-17 10:27 CEST (History)
3 users (show)

See Also:


Attachments
a patch implementing this option (5.45 KB, patch)
2017-07-14 21:57 CEST, Daniel Kahn Gillmor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Kahn Gillmor 2017-07-14 21:57:08 CEST
When unbound is maintained by a system manager that can actually keep
track of what daemons are running correctly, a pidfile is an
opportunity for extra failures, rather than a way to avoid failures.
    
In particular, if unbound terminates roughly, it might leave the
pidfile lying around. Then a subsequent unbound instance will think
that another unbound process is running when it isn't (particularly if
some other stable process happens to have landed on the same process
ID).
    
So for a system manager that is already capable of keeping track of
whether the daemon is running or not, it would be nice to have the
ability to avoid these extra failure modes by just ignoring pidfiles
entirely.

Since the same unbound config file might need to be used on a
distribution that might use different system managers, being able to
control the use of a pidfile by a command-line argument is probably
the cleanest way to go (see https://bugs.debian.org/867192).


(this is a copy of https://github.com/NLnetLabs/unbound/pull/1)
Comment 1 Daniel Kahn Gillmor 2017-07-14 21:57:53 CEST
Created attachment 424 [details]
a patch implementing this option
Comment 2 Robert Edmonds 2017-07-15 00:09:36 CEST
Hi,

Note that we're still discussing in Debian bug #867192 the best way to support both init systems and I suspect the better approach is to allow configuring the path to the pidfile via the command-line (overriding the compiled-in default and the 'pidfile' config value, if any).
Comment 3 Wouter Wijngaards 2017-07-17 10:27:57 CEST
Hi Daniel, Robert,

Thank you for the patch, I have applied it.  I guess the -p option solves the problem.  Apart from pidfile: "" in unbound.conf that does the same thing.

Best regards, Wouter