[bind10-dev] daemonize bind10 and logging

Jelte Jansen jelte at isc.org
Thu Dec 8 15:34:08 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/08/2011 04:06 PM, Jeremy C. Reed wrote:
> I have been attempting to write startup scripts for bind10 on a few 
> platforms. This includes writing a full rc.d style script for FreeBSD.
> 
> Some problems are:
> 
> - bind10 doesn't daemonize itself. It runs on the terminal. So if is in 
> a shell script you will need to background it (&).
> 

yes I too have a basic script which essentially does 'bind10&'

> - dumps logging to terminal by default. Often startup scripts don't 
> collect log output, so over time I don't know where this noise will go.
> 

personal note (I notice that you exclude startup failures below, so you
realize this as well), a lot of daemons don't print anything, even if
they fail to start, which annoys the crap out of me

> I want to make startup / stop script for other systems too. We need a 
> consistent way.
> 

+1, though given the restrictions/frameworks some systems have, I don't
think we can provide one script for all of them. But we can at least put
some effort in supporting their use

> I'd like to suggest we add a daemonize option, that detaches from 
> terminal, runs in background, and doesn't output to console except for 
> initial startup message or immediate failure message.
> 

+1

> If daemonized also don't allow logger to be configured to console. Well 
> we could warn instead but I don't know where complaint would be sent. 
> Maybe daemonize would default to log to syslog, but overriding 
> configurations is confusing.
> 

I'm wondering, and maybe this is a bit hackish, but we have a technical
difference with most software, and that is there are two 'defaults', one
provided by the code, and one provided by our spec files. So we can make
a difference between default-on-initialization and
default-once-configuration-is-read (some of the current output is logged
before even reading out the config settings). We could consider misusing
that :)

> On a related note, bind10 has a --pid-file option. It only records its 
> PID if this switch is used. Maybe we should always record the PID?
> 

+1

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7g2PAACgkQ4nZCKsdOncUAcgCfeyGT+XYbEAIvac9MzuI3wa3z
fg4An2t7kT6qIR8Cau/RFZDsuyljSXlt
=0jsz
-----END PGP SIGNATURE-----



More information about the bind10-dev mailing list