nectar-health-probe
A container exec health probe for OpenStack worker processes. It answers one question: is this pod's worker actually processing messages from its own queue? — not merely whether a PID exists.
Two checks are provided:
- rpc-ping — calls oslo.messaging's built-in ping endpoint
(
oslo_rpc_server_ping, available since oslo.messaging 12.4.0) on a specific RPC server, i.e. the queue<topic>.<server>. Targeting a specific server is essential: a bare topic call would round-robin the shared queue and any healthy replica could answer for a dead one. - amqp — passes if the pod's network namespace holds an ESTABLISHED
TCP connection to a
transport_urlport (read from/proc/net/tcp{,6}). For processes that consume from the bus without running an RPC server (notification listeners), which have no ping endpoint. This is a weaker check: it relies on AMQP heartbeat expiry to eventually drop the connection of a wedged process.
Usage
nectar-health-probe --project <svc> [options] {rpc-ping,amqp}
Typical invocations, run as Kubernetes exec probes inside the pod being checked:
nectar-health-probe --project varroa rpc-ping
nectar-health-probe --project warre amqp
nectar-health-probe --project heat --topic engine rpc-ping
--project does three things:
- oslo.config discovers
/etc/<project>/<project>.confand/etc/<project>/<project>.conf.d/— important where secrets such astransport_urlare injected as a conf.d snippet. control_exchangedefaults to the project name, reproducing theoslo_messaging.set_transport_defaults()call most services make in code. An explicitcontrol_exchangein the conf file still wins, exactly as it does for the service itself.- The rpc-ping topic defaults to
<project>-worker.
Options: --topic (RPC server topic), --server (queue suffix,
defaults to this hostname — matching workers that set
server=CONF.host), --exchange (hard override of the exchange),
--timeout (RPC reply wait, default 8s), plus the standard oslo.config
--config-file/--config-dir.
Exit codes: 0 healthy, 1 unhealthy, 2 usage error.
Server-side requirements
rpc-ping requires the service to expose the ping endpoint:
[DEFAULT]
rpc_ping_enabled = true
Recommended belt-and-braces: also render control_exchange = <svc> in
the service's conf so the config is self-describing for external tools,
even though the service sets the same value in code.
Probe configuration guidance
Use it as a startupProbe:
startupProbe:
exec:
command: ["nectar-health-probe", "--project", "myservice", "rpc-ping"]
periodSeconds: 10
timeoutSeconds: 10
failureThreshold: 30
Think twice before also wiring it as a livenessProbe: the check reaches through the message bus, so a RabbitMQ outage fails it on every worker at once and Kubernetes mass-restarts pods that oslo.messaging would have ridden out by auto-reconnecting. The failure class a probe reliably catches (a service manager that starts but never spawns a consumer) shows up at startup. If you do add liveness, use a long period and a high failureThreshold so it rides out broker blips — and remember each rpc-ping run spawns a Python interpreter plus an AMQP connection and reply queue, which is real RabbitMQ churn at fleet scale.
Keep database or Keystone checks out of probes entirely. Fleet-level correctness (service lists, agent heartbeats, queue depth, wedged consumers after startup) belongs to metrics alerting; pod probes should only assert "this process is processing its own messages".
Before trusting a new rpc-ping probe, verify the queue name
<topic>.<server> exists in the RabbitMQ management UI — a mismatched
server (some services hardcode one rather than using the host) or a
wrong exchange makes the probe fail closed and restart-loop the pod.
Release files for nectar-health-probe 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nectar_health_probe-1.0.1.tar.gz | 15.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nectar_health_probe-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.2 kB
Release files / nectar_health_probe-1.0.1.tar.gz
| Download URL | nectar_health_probe-1.0.1.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b265b1fa8ffea401310dcb26ae397df49bf26cb4854ba6fd63e9db7297d0c24
|
|
BLAKE2b-256 checksum How to use checksums |
ced71233c840e382828d0128ab44664226dd1a10e2ef0f1381dbf23469d79897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / nectar_health_probe-1.0.1-py3-none-any.whl
| Download URL | nectar_health_probe-1.0.1-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8691cee579d7f4c81253a211e473407c616f974dbcdb1788cf37a9aa02ce672
|
|
BLAKE2b-256 checksum How to use checksums |
a1af2238c7d0a9c5f5a3b9ce385ec13d871330c2411534bf409a228a504c523d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|