Extend gitlab:gitaly:check task with readiness verification
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
- Configure HA setup with a minimum of 1 Gitaly and 1 Praefect nodes
- Run
rake gitlab:gitaly:check
task, it should finish successfully if everything is set up correctly - 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 - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #348174 (closed)