[PATCH] bird.init: Added a check_config function and call it prior of, start and reload
Ondrej Zajicek
santiago at crfreenet.org
Mon Oct 6 23:54:10 CEST 2014
On Mon, Oct 06, 2014 at 11:35:44PM +0200, Pavlos Parissis wrote:
> On 06/10/2014 11:18 μμ, Ondrej Zajicek wrote:
> > On Sun, Oct 05, 2014 at 09:47:08PM +0200, Pavlos Parissis wrote:
> >> Hi,
> >>
> >> This another patch for the init script which adds a check_config
> >> function and call it prior of, start and reload.
> >
> > Hi
> >
> > Why to do this?
>
> Because it is needed for integration with configuration management
> tools(Puppet, chef and etc). Without the patch these tools are unaware
> that they just pushed a broken configuration. Bird operation is not
> effected as it doesn't load broken configuration.
>
> > Explicit checking of config has some specific use cases
> > but it is IMHO pointless in standard init scripts. If we need return
> > values (to see if BIRD was properly started or reconfigured), we should
> > get proper return values from the primary commands (that means that
> > 'birdc configure' should be used for reconfiguration instead of sending
> > HUP and i should ensure that birdc returns proper error code)
> >
>
> I was wondering why init script was not calling birdcl configure rather
> sending HUP, but I guess because it is not actively used/maintained.
>
> What would be the consequence of sending HUP rather calling birdcl
> configure, if any?
AFAIK the only consequence is that you cannot get the return value and
eventual error messages are handled differently (send to the log instead
of returned to birdc). I just checked that birdc/birdcl does not forward
the return value, but that is something that probably should be fixed.
--
Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20141006/48e8991f/attachment-0001.asc>
More information about the Bird-users
mailing list