gnocchi icon indicating copy to clipboard operation
gnocchi copied to clipboard

/healthcheck does not report problem

Open czunker opened this issue 6 years ago • 3 comments

I'm not sure whether this is a gnocchi problem or oslo_middleware. We are using Gnocchi in an OpenStack setup (openstack-ansible with Pike) with redis as incoming storage. Recently we had the problem, that redis died and gnocchi didn't answer API requests. a request to metric status was answered by a HTTP 500. Our HAProxy in front of the gnocchi API is configured to query /healthcheck. But it didn't report the backends as down.

Which version of Gnocchi are you using

gnocchi-4.0.5.dev8

How to reproduce your problem

Kill redis server, used as incoming storage. But that's just an example

What is the result that you get

/healthcheck returns HTTP 200

What is result that you expected

According to the oslo docs, I would expect a HTTP 503

czunker avatar Aug 08 '18 05:08 czunker

Gnocchi does not implements any advanced feature of oslo.middleware.healthcheck.

So by default it always return 200.

The only available oslo.middleware.healthcheck backends are disable_by_file, disable_by_files_ports

sileht avatar Aug 08 '18 06:08 sileht

Thanks for the info. We will then work around that in another way.

czunker avatar Aug 08 '18 07:08 czunker

We should replace that middleware by something better that actually implements what @czunker expects.

jd avatar Aug 16 '18 12:08 jd