Skip to content

Draft: community/bird: modernize initd for supervisor support

I observe bird crashes somehow triggered by major(?) bgp changes with bird on Alpine 3.17. Although I was not able to analyse the root cause yet, I noticed that it is currently not possible to use OpenRC's supervisor option with bird's init.d.

When setting supervisor=supervisor-daemon bird refused to start since it fails to write to the root-owned pid file managed by supervisor-daemon:

Dec  1 23:45:11 router daemon.crit bird: Cannot create PID file /run/bird/bird.pid: Permission denied
Dec  1 23:45:11 router daemon.warn supervise-daemon[17698]: /usr/sbin/bird, pid 17707, exited with return code 1
Dec  1 23:45:13 router daemon.info supervise-daemon[17709]: Child command line: /usr/sbin/bird -u bird -g bird -s /run/bird.ctl -R -c /etc/bird.conf -P /run/bird/bird.pid 

Moving the pidfile parameter into command_args_background (and adding command_args_foreground) makes it compatible with both startup variants.

Edited by Thomas Liske

Merge request reports