BridgeDB pretends to reload descriptors but actually doesn't
BridgeDB is supposed to reload its bridges descriptors every 30 minutes. The following cron job takes care of that (you can see it by running crontab -l
as the bridgedb user on polyanthum):
*/30 * * * * bin/reload-bridgedb >/dev/null 2>&1
Among other things, the script reload-bridgedb
does the following:
[...]
bridgedb -c ${BRIDGEDB_CONFIG} --reload
[...]
BridgeDB implements the --reload
command line switch but the switch doesn't actually reload anything. In fact, it does nothing at all. So when the cron job runs bridgedb with the --reload
switch every 30 minutes, it starts a separate (!) process that (re)loads the bridge descriptors and then exits because it cannot bind to the ports that the original BridgeDB is already bound to. Unfortunately, the new BridgeDB process writes to our log file, and makes it look like the original process is reloading bridge descriptors while it actually is our volatile, new process. In other words: the way it's set up now, BridgeDB never actually reloads bridges.
Fortunately, the fix is relatively simple: we just have to send the process a SIGHUP. BridgeDB has a SIGHUP handler that – unlike the --reload
switch – actually works. We should also remove the --reload
switch.