Page MenuHomePhabricator

When making a config change, add a banner to let the user know to restart daemons
Closed, ResolvedPublic

Description

Not all config changes require daemon restarts, but a bunch do. Give the user a banner suggesting they restart daemons.

Event Timeline

btrahan raised the priority of this task from to Needs Triage.
btrahan updated the task description. (Show Details)
btrahan added subscribers: btrahan, epriestley.

At HEAD, I think they should ~never need restarts after repository edits, since we'll now reload the repository in bin/repository update. This only landed like last week though.

The major one I am aware of is when configuration changes. This seems hard to do surgically (e.g., we'd basically just have to say "restart the daemons" after every config change, since there are probably like 150 options that can affect them). But maybe we should.

A simple way to do this would maybe be redirect to "?you-edited-something=true" after a config edit, and throw a "Hey, remember to restart the daemons!" banner on that page?

We could try to get the daemons to refresh configuration, but there are limits to their ability to react to configuration changes without phd restart (for example, they can't change their pidfile location midstream).

But maybe we should.

I don't know what that was about, I don't favor trying to separate daemon-affecting config from non-daemon-affecting config.

Overall, the "hey, remember to restart the daemons" banner seems most reasonable to me here.

btrahan renamed this task from When a user edit probably requires daemons to be restarted, let the user know at edit time to When making a config change, add a banner to let the user know to restart daemons.Apr 23 2014, 8:02 PM
btrahan updated the task description. (Show Details)

A maybe cleaner approach to this is:

  • Add a function to hash all of the config values.
  • When starting a daemon, insert the config hash into the daemon log table (this requires a new column).
  • Add a setup check to compute the current web config hash and compare it to the daemon config hashes.
  • If there are running daemons with a bad hash, raise a config warning: "you should restart the daemons, their configuration is out of date..."

I think that plan ^^^ is a pretty good one, and this crops up somewhat-often.

btrahan triaged this task as Normal priority.Aug 22 2014, 9:30 PM