Skip to content

Commit 5340e67

Browse files
committed
feat(neutron): use oslo.healthcheck for readiness probe
The neutron-server readiness probe now targets the oslo.middleware /healthcheck endpoint instead of the API root /. This routes the probe through a uWSGI worker and enables graceful draining by creating /var/lib/neutron/healthcheck_disable to remove a pod from Service rotation without restarting it. The liveness probe is intentionally left on the uWSGI stats endpoint (port 1717), which is served by the master process, so a dependency outage cannot trigger a restart storm across neutron-server pods. Assisted-by: Claude Opus 4.8 Change-Id: I09a4e7c4b4f174c463797094e72acec8b706d0ee Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
1 parent d03dd06 commit 5340e67

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

neutron/templates/deployment-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515
{{- define "serverReadinessProbeTemplate" }}
1616
httpGet:
1717
scheme: HTTP
18-
path: /
18+
path: {{ tuple "network" "healthcheck" "internal" . | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }}
1919
port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
2020
{{- end }}
2121
{{- define "serverLivenessProbeTemplate" }}

neutron/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,7 @@ conf:
13371337
composite:neutron:
13381338
use: egg:Paste#urlmap
13391339
/: neutronversions_composite
1340+
/healthcheck: healthcheck
13401341
/v2.0: neutronapi_v2_0
13411342
composite:neutronapi_v2_0:
13421343
use: call:neutron.auth:pipeline_factory
@@ -1368,6 +1369,11 @@ conf:
13681369
paste.app_factory: neutron.pecan_wsgi.app:versions_factory
13691370
app:neutronapiapp_v2_0:
13701371
paste.app_factory: neutron.api.v2.router:APIRouter.factory
1372+
app:healthcheck:
1373+
paste.app_factory: oslo_middleware:Healthcheck.app_factory
1374+
backends: disable_by_file
1375+
# state_path is writable; drain a pod by touching this file.
1376+
disable_by_file_path: /var/lib/neutron/healthcheck_disable
13711377
filter:osprofiler:
13721378
paste.filter_factory: osprofiler.web:WsgiMiddleware.factory
13731379
neutron_api_uwsgi:
@@ -2527,6 +2533,7 @@ endpoints:
25272533
# key: null
25282534
path:
25292535
default: null
2536+
healthcheck: /healthcheck
25302537
scheme:
25312538
default: 'http'
25322539
service: 'http'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
neutron:
3+
- |
4+
The neutron-server readiness probe now targets the oslo.middleware
5+
``/healthcheck`` endpoint (backed by ``disable_by_file``) instead of the
6+
API root ``/``. This routes the probe through a uWSGI worker and enables
7+
graceful draining: create ``/var/lib/neutron/healthcheck_disable`` to
8+
remove a pod from Service rotation without restarting it. The liveness
9+
probe is intentionally left on the uWSGI stats endpoint (port 1717), which
10+
is served by the master process, so a dependency outage cannot trigger a
11+
restart storm across neutron-server pods.
12+
...

0 commit comments

Comments
 (0)