<!doctype html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div dir="auto">Hello!<br><br>Well, it's a pity that systemd doesn't allow for custom operations – in such case you could call "systemd graceful bird2" or "systemd restart bird2"…<br><br>Anyway, feel free to implement it, it should be like 10 lines of code. Sigusr2 is probably ok. Then it'll be on anybody to choose whether to restart gracefully or hardly by systemd.<br><br>Maria</div><br><br><div class="gmail_quote"><div dir="auto">On 20 June 2023 20:20:50 CEST, Erin Shepherd <bird-users@erinshepherd.net> wrote:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>Hello,<br></div><div><br></div><div>I run bird on a system which uses systemd as a service supervisor, and would like to implement graceful restart in a way which works well with it.<br></div><div><br></div><div>In particular, what I'd like to do is:<br></div><ul><li>If I restart the bird service (e.g. for an upgrade), Bird performs a graceful restart<br></li><li>If I manually stop bird (systemctl stop bird2), shutdown the system, or any other action which is liable to cause a longer period of downtime, perform a graceful restart (for BGP at least)<br></li></ul><div>Ideally systemd would have an <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">ExecStopRestart</span> option which could be used to distinguish between stops and restarts, but unfortunately it doesn't (I might submit a feature request for this regardless). However, it does support <span class="term"><code class="varname"><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">KillSignal</span> and <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">RestartKillSignal</span> options.</code></span><br></div><div><br></div><div><span class="term"><code class="varname">So therefore I was wondering how the Bird developers and users would feel about introducing a signal (SIGUSR2 maybe?) which can be used to request that Bird perform a graceful restart?</code></span><br></div><div><br></div><div><span class="term"><code class="varname">- Erin</code></span><br></div></blockquote></div><div dir="auto"><div class='k9mail-signature'>-- <br>Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.</div></div></body></html>