From 133200014ba4aabfda6c516dda2e42e7638c3e4d Mon Sep 17 00:00:00 2001
From: Thomas Goirand <zigo@debian.org>
Date: Thu, 30 Apr 2020 16:38:35 +0200
Subject: [PATCH] Add a /healthcheck URL

The /healthcheck is helpful for operators to setup neutron-api
behind haproxy, or for doing monitoring.

Change-Id: I83b8c2afdd74b57184200daab54255e8cae9c27b
---
 etc/api-paste.ini | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/etc/api-paste.ini b/etc/api-paste.ini
index 8e8cf283b51..f31f6486de2 100644
--- a/etc/api-paste.ini
+++ b/etc/api-paste.ini
@@ -5,13 +5,13 @@ use = egg:Paste#urlmap
 
 [composite:neutronapi_v2_0]
 use = call:neutron.auth:pipeline_factory
-noauth = cors http_proxy_to_wsgi request_id catch_errors osprofiler extensions neutronapiapp_v2_0
-keystone = cors http_proxy_to_wsgi request_id catch_errors osprofiler authtoken keystonecontext extensions neutronapiapp_v2_0
+noauth = healthcheck cors http_proxy_to_wsgi request_id catch_errors osprofiler extensions neutronapiapp_v2_0
+keystone = healthcheck cors http_proxy_to_wsgi request_id catch_errors osprofiler authtoken keystonecontext extensions neutronapiapp_v2_0
 
 [composite:neutronversions_composite]
 use = call:neutron.auth:pipeline_factory
-noauth = cors http_proxy_to_wsgi neutronversions
-keystone = cors http_proxy_to_wsgi neutronversions
+noauth = healthcheck cors http_proxy_to_wsgi neutronversions
+keystone = healthcheck cors http_proxy_to_wsgi neutronversions
 
 [filter:request_id]
 paste.filter_factory = oslo_middleware:RequestId.factory
@@ -43,3 +43,6 @@ paste.app_factory = neutron.api.v2.router:APIRouter.factory
 
 [filter:osprofiler]
 paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
+
+[filter:healthcheck]
+paste.filter_factory = oslo_middleware:Healthcheck.factory