Initial framework for startup check - praefect migrations
When a praefect or gitaly node starts up, there a number of conditions we need to check to ensure the setup is healthy. Eg: are migrations up to date? is the configuration sensible? is the database connection reliable?
These are all checks that should happen not only on startup, but also at periodic times to ensure the service is healthy.
We first need a simple interface that is easy to call via:
- code on startup
- an RPC (if we want to add a scheduled job in Rails to check the health)
- a praefect or gitaly subcommand (so admins can schedule their own jobs however they like)
The first check we should do is a praefect migrations check, since it is fairly simple.