Setting BIRD up for uninterrupted package upgrades

Ondrej Zajicek santiago at
Wed Aug 12 12:28:31 CEST 2015

On Tue, Aug 11, 2015 at 06:51:14PM +0000, Matt Dupre ( wrote:
> Hi all,
> I'm working on Project Calico (, where
> we've been using BIRD as a BGP Router.  We'd like to be able to set BIRD
> up such that we can upgrade the package in future without removing any
> routes.  Does anyone have a good way to do this - we're using Ubuntu
> 14.04 (upstart) and RHEL 7.1 (systemd)?
> I've got graceful restart configured (`graceful restart;` in the
> protocols and `-R` on the command line), and this works great for
> unexpected restarts (such as segfaults) - upstart / systemd restarts BIRD
> and it resumes normal operation without removing any routes.  We've
> considered modifying the job/service to kill BIRD instead of stopping it
> gracefully (for example as a pre-stop command), but I'm just wondering if
> there's a better way. 


There is currently no command for 'pre-restart shutdown' and also there
is no automatic detection for GR recovery at start. Currently you have
to kill BIRD instead (which should be OK) and add -R option for GR
recovery at start.

Note that -R option should be added only for the restart, not for the
regular start (that is why it is a command-line option and not a part of
the configuration). Although adding it always is not a big problem.

We probably should add such features. I am open to suggestions how this
should behave - how such 'pre-restart shutdown' command could be named,
should the daemon return different return value (probably not) and where
the external state (to know whether we should/shouldn't do GR recovery
at startup) for GR could be stored, and how it could be integrated
with distribution scripts/unit files.

For the external state, there are some simple solutions like keeping an
empty file in /run along the bird.ctl - if this file is here at start, we
do GR recovery. But the problematic part here is to avoid distribution
scripts messing with it in an improper way. Another, perhaps more elegant
way would be to look if there are any BIRD routes the in routing table,
if so, do GR recovery. But that will not work if both 'persist' and
'graceful restart' options are enabled for the kernel protocol.

Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3,
"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: <>

More information about the Bird-users mailing list