Bug: Liveness health checks are hardcoded to return success

Summary

As far as I can tell, the liveness health checks that are run by calling /-/liveness are hardcoded to return success. The liveness method is only defined in the BaseAbstractCheck class, and not anywhere else.

The is in contrast to the readiness checks which use SimpleAbstractCheck#readiness, or the Check's own method (in the case of the GitalyCheck for example).

We should either implement these checks, or document that they are indeed hardcoded to success.

Steps to reproduce

Call /-/liveness on your Gitlab instance.

Example Project

This happens in the GDK (ce and ee).

What is the current bug behavior?

The current behaviour is that /-/liveness will always return:

{
   "db_check":{
      "status":"ok"
   },
   "redis_check":{
      "status":"ok"
   },
   "cache_check":{
      "status":"ok"
   },
   "queues_check":{
      "status":"ok"
   },
   "shared_state_check":{
      "status":"ok"
   },
   "gitaly_check":{
      "status":"ok"
   }
}

What is the expected correct behavior?

  • The liveness check should return a simple "OK" response, or fail.
{
   "status":"ok"
}
Edited Sep 25, 2019 by Sean Arnold
Assignee Loading
Time tracking Loading