Ondrej Zajicek <santi...@crfreenet.org> writes:

> On Tue, Mar 06, 2018 at 12:26:02PM +0100, Toke Høiland-Jørgensen wrote:
>> Rob Lister <r...@lonap.net> writes:
>> > root@rs1f:/etc/bird# service bird start
>> > Job for bird.service failed because the control process exited with 
>> > error code.
>> > See "systemctl status bird.service" and "journalctl -xe" for details.
>> >
>> > root@rs1f:/etc/bird# systemctl status bird.service
>> > ● bird.service - BIRD Internet Routing Daemon (IPv4)
>> >     Loaded: loaded (/lib/systemd/system/bird.service; enabled; vendor 
>> > preset: enabled)
>> >    Drop-In: /etc/systemd/system/bird.service.d
>> >             └─override.conf
>> >     Active: failed (Result: exit-code) since Mon 2018-03-05 19:16:16 UTC; 
>> > 8s ago
>> >    Process: 510 ExecStartPre=/usr/sbin/bird -p (code=exited, 
>> > status=1/FAILURE)
>> So this says that it's `bird -p` that fails. This is a check of the
>> configuration file before the actual daemon is started. Since that is
>> not passed the $BIRD_ARGS (as you can see from the command line
>> invocation), it fails, which prevents startup of the actual daemon.
>> You'd have to add the same $BIRD_RUN_USER, $BIRD_RUN_GROUP and
>> $BIRD_ARGS to the ExecStartPre line I guess; the fact that it is not
>> there already is a bug in the systemd unit file, I'd say. I guess this
>> is a packaging bug on the Debian side? In which case you should open a
>> bug in the Debian system :)
> Well, the only option that is necessary to add to ExecStartPre is the
> option -c for the config file. But other options there are probably
> harmless.

I was mostly thinking that the user and group should be there because
that can influence whether or not the config file is readable; but it
depends on whether bird actually drops privileges in -p mode.

> Unfortunately with systemd we cannot find a better way to get sane
> behavior w.r.t. config file errors than execute BIRD two times (one in
> parser-only mode).

What's wrong with just exiting the main process on config file errors?
Why is the pre-check needed?


Reply via email to