Skip to content

cp,cmd: Provide a cp cmd with config reload support

Vgutierrez requested to merge cp-cmd into main

cp cmd will reload its configuration after receiving a SIGHUP signal. After reloading the config it will check which control planes need to be spawned (new ones), respawned (config updated on running ones) or shutdown (old control planes)

Globally it will also update the log level

TODO:

  • unify signals meaning across cmds: right now SIGHUP is used on other cmds to perform a shutdown without cleaning up the state (fp, hcforwarder). I think it good be a good idea to use os.Interrupt, SIGTERM as the signal to trigger that kind of shutdown and a custom one to trigger a shutdown that cleans up the state.
  • add support for config reload (at least for updating the log level) on other cmds

Merge request reports