Skip to content

Consider removing watch_configuration

arti currently has a watch_configuration option that auto-reloads its config files (and potentially other related files such as hs authorized keys) on modification. AFAICT this is meant to be a "user friendly" feature, but IMO is more problematic than it's worth.

  • This isn't the expected behavior for services, at least on Linux, where typically you'd send SIGHUP or restart.
  • Users need to be careful not to have watch_configuration enabled when doing non-atomic modifications to their config files.
  • It's tricky to get right. See e.g.
    • #1794 (closed): reload loops if we're not careful about ignoring some events.
      • The fix has a bit of a catch-22 for handling unrecognized event types: ignore them and risk not loading a modified file, or don't ignore them and risk a reload loop !2696 (comment 3145973)
    • #1607 (though that might just be a testing problem)
    • #1700 have had to disable kqueue support, affecting freebsd and macos
  • It can be expensive on platforms that have to poll (#1644 (closed))
  • RPC can be used for explicit reload requests on platforms and embedded use-cases where SIGHUP doesn't make as much sense. e.g. there could be commands for "reload everything", "reload any files that have been modified", "reload file X"

Are there any use-cases that aren't better served by SIGHUP or RPC?

Edited by Jim Newsome