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.
Metadata
Release files for nectar-health-probe 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nectar_health_probe-1.0.2.tar.gz | 15.7 kB | Without provenance | Details for nectar_health_probe-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nectar_health_probe-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for nectar_health_probe-1.0.2-py3-none-any.whl |
Total release size: 30.6 kB
Release files / nectar_health_probe-1.0.2.tar.gz
| Download URL | nectar_health_probe-1.0.2.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e19ea8837c599ba79544f8b9bc2e1cab39a574255b1ef144aa8a37f017b562f6
|
|
BLAKE2b-256 checksum How to use checksums |
7b229fcb45e714ba3da505289705d95f136f4f8fd70628eebf91075d10be007e
|
| 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.2-py3-none-any.whl
| Download URL | nectar_health_probe-1.0.2-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f02db9fd329fe0e3d99a17d8295d2a5fd1165852bfd1e10aa0ebc403dc67222
|
|
BLAKE2b-256 checksum How to use checksums |
eb947e9b12e7cee4c6ba797231633dabbb797282082d271ed3b7555a36cba0b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for nectar-health-probe 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.