Commit Graph

4 Commits

Author SHA1 Message Date
Adam Simpkins
1cf24c15b5 enable log rotation in edenfs_monitor
Summary:
Add new fields to EdenConfig to control log rotation settings, and update
edenfs_monitor to set up the log rotation strategy using these settings.

Reviewed By: chadaustin

Differential Revision: D20427271

fbshipit-source-id: 9960bdb6f4d077a4e21fb4a6209aa02ab21ad653
2020-05-07 20:05:46 -07:00
Adam Simpkins
11e1432ff8 update the EdenFS monitor to support self-restarts
Summary:
Update the EdenFS monitor to restart itself when it receives SIGHUP.  This
allows upgrading the monitor daemon to a new version of the software without
disrupting the current running EdenFS daemon.

Reviewed By: wez

Differential Revision: D19588698

fbshipit-source-id: f0303788cee0cc9bf4ce3b7342f10a595c3874b1
2020-01-31 13:22:27 -08:00
Adam Simpkins
b03d2b6c89 update the monitor to poll for successful EdenFS startup
Summary:
Update the SpawnedEdenInstance class to wait for EdenFS to become healthy
before signalling the Future returned by `start()`.

This code works by just polling the `getStatus()` call every few hundred
milliseconds, and waiting until it returns `ALIVE`.

Currently the code will poll forever, until EdenFS either becomes healthy or
exits.  In practice we will likely configure startup timeouts in systemd,
which means that they probably are not necessary in this code.

Reviewed By: wez

Differential Revision: D19588699

fbshipit-source-id: fef57ca23fcc14da908c2e4f7f715db33b7bf841
2020-01-31 13:22:27 -08:00
Adam Simpkins
4f7fd33e29 add a new process to monitor EdenFS
Summary:
Add a simple new wrapper daemon to manage the edenfs daemon.  This is intended
to provide a few different features:

- Perform log rotation for EdenFS's output and the output of any of its
  spawned children processes.
- Help schedule restarts of EdenFS when the system looks idle.
- Provide a single process for the system to manage across graceful EdenFS
  restarts, to make management slightly simpler.

This initial commit does not perform graceful restarts yet, but has the basic
daemon management and log rotation present.

Reviewed By: wez

Differential Revision: D19588700

fbshipit-source-id: bba41c9f7efeb4417753c1d48dd72cf6d191f0c3
2020-01-31 13:22:26 -08:00