Skip to content

Extend gitlab:gitaly:check task with readiness verification

Pavlo Strokov requested to merge 348174-check-gitaly-readiness into master

What does this MR do and why?

To verify Praefect is ready to server the requests 'gitlab:gitaly:check' task was extended to call 'ReadinessCheck' RPC. The RPC was introduced in gitaly!4674 (merged) and allows to run 'praefect -config conf.toml check' sub-command from the remote. If any check on remote fails it will be reported by the task. The checks are executed only if Praefect is used, in case when setup has no Praefect the RPC call to remote (in that case it would be Gitaly) will always return no errors if the service is reachable.

How to set up and validate locally

  1. Configure HA setup with a minimum of 1 Gitaly and 1 Praefect nodes
  2. Run rake gitlab:gitaly:check task, it should finish successfully if everything is set up correctly
  3. Stop the database that is used by Praefect, so it is not reachable to it anymore or you can remove one row from schema_migrations table
  4. Run rake gitlab:gitaly:check task, it should finish with error

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #348174 (closed)

Merge request reports