Skip to content
Opod

Operate

Doctor and runbook

opodcp doctor prints one row per port and per check, embedded or connected, green or red. Every row, when it turns red, the flags, and how to fix it.

In short

opodcp doctor is the health check for the control plane itself. It prints one row per port and per check: which adapter runs, whether it is the built-in default (embedded) or your own service (connected), green (✔) or red (✘), and one line of detail. A red row degrades one feature and says which; the control plane keeps serving. opodcp runbook ROW prints the causes and the fix for any row.

When you need it

  • Right after an install or an upgrade, to see that every port is green.
  • When the console or an alert says something is wrong and you need to know which part.
  • In a script or a CI gate: the command exits non-zero while any row is red.
  • After you save a connector, to see that it took.

Do it

  1. Run it in the control plane's pod

    kubectl -n opodcp exec deploy/opodcp -- /opodcp doctor

    The pod already holds the admin token in its environment, so no flag is needed. The output is one row per check:

    control plane http://127.0.0.1:8080
    ✔ state       postgres           connected      Postgres via OPODCP_STATE_DSN — the control plane's only durable store; the pod keeps nothing
    ✔ events      in-process+journal embedded       …
    ✔ usage       spool              buffer         …
    ✘ identity    local users        embedded       BOOTSTRAP: the shared admin token is the only way in, so every action is audited as `static-admin` …
    …
    error: 1 port(s) not OK

    Columns: the mark, the row, the adapter, the mode, the detail. A line adapters: … under a row lists the adapters you may connect to that port.

  2. Read the runbook for each red row

    kubectl -n opodcp exec deploy/opodcp -- /opodcp runbook identity

    It prints what green reads, every way the row turns red with its cause and remedy, and how to connect your own service.

  3. Fix, then run the doctor again

    Most fixes are a connector on the Connectors page or a chart value. The rows you meet first are under The red rows you will meet first.

Check it worked

kubectl -n opodcp exec deploy/opodcp -- /opodcp doctor; echo "exit=$?"

A good answer has no ✘ row and ends with exit=0. The console shows the same rows on Settings → Ports & adapters and on each Connectors card.

If it fails

OutputCauseFix
error: control plane https://cp.example.com: http 401 — set OPODCP_ADMIN_TOKEN or pass --token (0.3.6) · error: doctor: GET /api/v1/doctor: the control plane at … did not accept the token (…) — pass --token or set OPODCP_TOKEN; the admin token is Secret opodcp-admin … (the release after 0.3.6)--cp without a token, or a wrong onepass --token with a viewer or admin token
error: doctor: GET /api/v1/doctor: no control plane at … — pass --cp URL or set OPODCP_URL and for what this machine alone can see: opodcp doctor --local (the release after 0.3.6)you named a control plane (--cp, --url or OPODCP_URL) and it did not answercheck the address and the tunnel, or run opodcp doctor --local
no control plane answering at http://127.0.0.1:8080 (…) — reporting what this process can seeno --url, and nothing listens on this machinerun it inside the pod, or pass --url
Rows read not asked or not observablea local report: it could not ask a running control planerun it against the serving control plane
Only one row, state in mode setupthe control plane is in setup modeconnect the database; see state
error: N port(s) not OKat least one row is redread each ✘ row and its runbook

How it works

opodcp doctor asks a running control plane how each of its ports and checks stands: the adapter, its mode (the embedded default or a connected service of yours, among others), green or red, and a detail line. A red secondary port degrades one feature and says so; the control plane keeps serving. A row is green (✔) or red (✘). In the release after 0.3.0 (it arrives then; 0.3.0 has green and red only), a green row can also be a warning (!, "warn": true in the JSON, amber advice in the console): advice that is not a fault, which never fails the exit code. Other advice stays green and says so in its detail.

kubectl -n opodcp exec deploy/opodcp -- /opodcp doctor        # asks the control plane that is serving
opodcp doctor --cp https://cp.example.com --token <admin token>    # from your laptop (--url on 0.2.1)
curl -s -H "Authorization: Bearer <token>" https://cp.example.com/api/v1/doctor

GET /api/v1/doctor needs the viewer role and returns a JSON list of rows: port, adapter, mode, ok, detail, available (the adapters registered for the port; a planned one reads name (target)) and, on ports that send somewhere, sinks with what each sink sent, failed, dropped and queued. The console shows the same rows under Settings → Ports & adapters and on Connectors.

Flags

FlagDefaultMeaning
--cp URLOPODCP_URL, else http://127.0.0.1 on the port of OPODCP_ADDR (:8080)the control plane to ask
--url URLthe samethe same as --cp, its older name
--token TOKENOPODCP_TOKEN, else OPODCP_ADMIN_TOKEN (0.3.6: OPODCP_ADMIN_TOKEN only)the bearer token sent with the request
--ca FILEthe system's rootsthe CA that signed the control plane's certificate (the release after 0.3.6)
--localoffdo not ask a running control plane; report what this process can see

When you name no control plane and nothing answers on this machine, the doctor says so on stderr and falls back to --local. When you name one — --cp, --url or OPODCP_URL — a control plane that does not answer is an error, and the doctor prints the reason and opodcp doctor --local. In 0.3.6 only --url counted as naming one: --cp fell back to a local report and ended on an unrelated error; the fix arrives in the release after 0.3.6. In a local report the controllers and telemetry rows read not observable, and a port it could not ask reads not asked with mode unknown. The command exits non-zero (N port(s) not OK) when any row is red, so a script can gate on it.

Runbook

opodcp runbook prints the full runbook, one section per row: what green reads, every way it goes red with the cause and the remedy, how to connect your own service, and what a switch moves. opodcp runbook <row> prints one. The runbook is built into the binary, so it always matches the release you run.

Modes

ModeMeaning
embeddedthe built-in default is in use
connecteda service of yours, or a cluster feature the row found
bufferusage only: no sink is connected and usage is buffering in the database
bootconfig only: a setting read at boot that could not take effect
setupstate in setup mode; the doctor then returns this one row, and only to the admin token
blocked, electedcontrollers: the lease check failed; or a replica that holds, or waits for, the lease
enginekv-tier, kv-disk: one row per endpoint, with the endpoint as the adapter
unsetregistry: no leader image is configured
configuredsecrets: a store is configured and is either not reachable (red) or cannot be probed (green)
unknown, not observablea local report that could not ask

Rows

Rows marked † are new in 0.3.0.

RowReports onDefault → yoursRed when
statethe database: the control plane's only durable storepostgres (always connected)setup mode, or the database does not answer a ping
eventsthe event bus (console stream, fan-in between replicas)in-process+journal → natsa NATS dial or auth error; or a standby replica that hears none of the lease holder's events
metrics/metrics and an optional OTLP pushprometheus-scrape → prometheus-scrape+otlpthe OTLP push has a last error
tracesthe OTLP collector rendered into every leadernone → otlpOPODCP_TRACES_SAMPLE_RATIO is not a number from 0 to 1
kvstorethe shared KV store for peer tiersnone → lmcache-redis, or shared-volume (the release after 0.3.6)the store does not answer, or refuses the password; for shared-volume, a URL that does not parse (it dials nothing: a missing class shows on the endpoint)
logswhere control-plane records, the audit stream and events go besides stdoutstdout → otlp, splunk-hecthe setting cannot run; or the sink has a last error
usageusage facts and the sink they ship to; its schema step and lagspool (mode buffer) → postgres, clickhouse, s3 (and parquet up to 0.3.6)the sink refuses; a schema step is pending that nobody runs; the sink holds rows past retention; retention is invalid; or 10,000 rows buffered with no sink
batchfilesthe object store for the batch APInone → s3the store is configured and refused, or the bucket cannot be opened
identitysign-in: local users or OIDClocal-users → oidcINSECURE: auth disabled, or OIDC misconfigured
notifieralert delivery, per sinkconsole → webhook, alertmanager, slack, pagerdutya sink refused a delivery
checkpointswhere job checkpoints gohostpath → pvcthe StorageClass cannot provision the volume
secretsthe secret store for minted tokenskubernetes-secrets → vaultthe store URL is rejected, or Vault refuses a write
registrywhere images come fromghcr.io → your registryno leader image is configured (engineImages.leader)
controllersthe control loops: last run, errors; standby or blocked on a replica without the leaseN loopsthe lease check failed (blocked); no loops and no executor; a loop reports errors
kv-tier †per endpoint with a host KV tier: whether its workers report it—none of its workers reports the tier
kv-disk †per endpoint with a disk KV tier: whether its release starts one—the leader and worker images predate the disk tier
config †port settings read at boot that could not take effectappears only when something disagreesalways red when present
telemetryprobe pods, reads and pushes (from the release after 0.3.6, N read by this replica · N pushing), measured devices, host factsvendor-probesa probe reports an error, or the collector has not started
gpu-toolkitthe NVIDIA container toolkit on NVIDIA nodesnvidia-container-toolkita node's toolkit refuses NVIDIA_VISIBLE_DEVICES for unprivileged pods (accept-nvidia-visible-devices-envvar-when-unprivileged = false)
autoscalerthe adapter in use, and KEDA's healthembedded → kedakeda is chosen and its CRDs or operator are absent
north-tlshow endpoints are reached from outside: HTTPRoute, Ingress or noneself-signed or none → gateway-api, ingressendpoints.expose=gateway and no Programmed Gateway
gpu-sharing †budget or time-sliced sharing, and what it promisesbudget → timeslicethe nodes cannot be read; a node labelled for time-slicing whose plugin presents no slices (named in the detail; red from 0.3.0, green on 0.2.1)
gangswhether gangs land as LeaderWorkerSets or one Deployment per partdeployments → leaderworkersetthe LeaderWorkerSet controller is installed but down
network-policywhether the cluster enforces NetworkPolicya named CNI, k3s, or unconfirmedno enforcing CNI was recognised (unconfirmed), or k3s runs with --disable-network-policy
leader-isolationthe per-endpoint leader policies: isolated or open, and whyoff → networkpolicya policy leaves a leader's port open; the API server's source is unknown; networkPolicy.leaderIsolation.from does not parse
secrets-at-rest †whether the cluster encrypts Secrets in etcdunconfirmed, k3sa k3s server runs without --secrets-encryption, or the nodes cannot be listed
node-taintsGPU nodes kept out by a taint nothing toleratesworkloads.tolerationsa GPU node is kept out, or workloads.tolerations does not parse
identitywho can sign in, and whether every action is attributed to a personlocal users → oidca shared admin token is configured (BOOTSTRAP, SHARED ROOT BESIDE REAL USERS), or the user store cannot be read
front-doors †nodes that may hold a door, and endpoints capped by themscheduleran endpoint runs fewer doors than it asks for
endpoint-resilience †serving endpoints that one failure would stopplannernever: advice only, it stays green
net.serverthe release after 0.3.6: the Kubernetes API answers, and in how many mskube-apiserverthe API server does not answer
net.cnithe release after 0.3.6: which CNI runs the pod network (k3s's built-in flannel included)the CNI's name, or unknownnever red; unknown when no CNI is recognised
net.cidrsthe release after 0.3.6: each node's pod CIDR, and the Service range when the cluster states it (ServiceCIDR objects, or the k3s server's --service-cidr)nodesnever red; says when the Service range is not readable
dns.corednsthe release after 0.3.6: Ready cluster DNS pods (k8s-app=kube-dns)corednsno DNS pod is Ready
fabric.attachmentthe release after 0.3.6: the Multus attachment that RDMA pods ask fornone (no pod asks), multus, hostnetworka pod asks for RDMA and Multus is not installed, or its NetworkAttachmentDefinition does not exist, or no node advertises the RDMA resource. Amber when the attachment cannot be read
leader-spread †whether leaders are spread over the nodes that may hold oneschedulerone node holds more than half the leaders; a leader sits on a GPU node while a GPU-less one may hold it; the cell door's replicas share a node
leader-fence †fenced, preferred and out-of-pool nodes, and how many may hold a leaderopod.io/leadersfewer than two nodes may hold a leader
cp-node †whether the control plane itself runs on a node with an acceleratorschedulerit runs on a GPU node while a Ready, uncordoned, untainted node with no accelerator could hold it (the row prints the restart that moves it); a warning (!, arrives in the release after 0.3.0; in 0.3.0 this case is green) when no Ready node without an accelerator exists, for example a cluster of GPU nodes only: add a CPU node, or accept the cost — the control plane takes CPU and memory there, never a GPU. A pod that nodeSelector pins there while a node without one exists stays green
template-driftendpoints whose running pod templates differ from what this release renderstemplate-hashany endpoint runs a template this release renders differently
auth-snapshotseach endpoint's auth snapshot age against its boundkubernetes-secreta snapshot is past its bound, not re-issued for three periods, or cannot be written
fabricwhat a gang across nodes ridespcie+ethernet → rdmanever; the detail names the nodes with an RDMA NIC
hub-tokenwhether a Hugging Face token is setkubernetes-secretnever; the detail says whether gated models can be fetched
images-signedwhether each image a rollout would run has a signature that verifies, and the trust root in usewarn, enforce, offno usable trust root; or, under enforce, an image whose signature is invalid, absent or unverified
endpoint-identityworkloads in the namespace that belong to no endpoint in this storeendpoint-idany such workload, or the read fails
cloudthe provider adapter, and whether the node-zero tier is ononpremOPODCP_CLOUD names a provider this build does not carry
licencethe tier and how many GPUs are licensedfree tier → your key (connected)the cell holds more GPUs than are licensed, or the key is invalid
executorthe Kubernetes executor and its RBACkubernetesno cluster client, or the API server does not answer

On 0.2.1 identity appears twice: the first row is the sign-in connector (local users or OIDC), the second is attribution (whether a shared admin token is still accepted). From 0.3.0 the second is its own row, sign-in; its remedy is to rotate the shared token, because the chart cannot remove it yet.

The red rows you will meet first

identity — BOOTSTRAP: the shared admin token is the only way in. Expected right after install. Create a user (POST /api/v1/users) or connect OIDC, then unset admin.token and upgrade. SHARED ROOT BESIDE REAL USERS is worse: people exist and the shared token still works, so attribution is optional.

state — setup mode. no-database: set ports.state.dsnSecret.name. unreachable: fix the database or the DSN; the control plane takes it the moment it answers. newer-schema: upgrade back to that release or restore a backup. ladder-store: back up with the old release and restore into an empty database. Setup mode is new in 0.3.0; 0.2.1 keeps its state in SQLite.

usage — no sink, or a sink behind. With no sink, usage only buffers in the database; at 10,000 buffered rows the row turns red and raises usage.no-sink. A sink that refuses holds rows (they are never trimmed while untaken) and the database fills: fix the sink, or accept the loss explicitly with POST /api/v1/usage/sink/skip?before=…. See Usage.

template-drift. Roll out each named endpoint when you choose. See Upgrade.

node-taints. Set the workloads.tolerations value the row prints, or leave the node unused.

telemetry — fewer nodes measured than have GPUs. kubectl -n opodcp get pods -l app=opodcp-gpu-telemetry -o wide: a Pending probe is a taint or an image pull. Without a measurement the placer does not place on that node.

gpu-toolkit. The row names nodes whose toolkit has accept-nvidia-visible-devices-envvar-when-unprivileged = false: a shared (packed) worker there cannot be pinned to one card. Set it to true in /etc/nvidia-container-runtime/config.toml and restart the container runtime, or keep those nodes dedicated. A missing RuntimeClass nvidia is preflight row runtime.nvidia, not this row.

controllers — blocked. The replica cannot hold its Lease (RBAC). Grant coordination.k8s.io/leases or set OPODCP_LEADER_ELECTION=0 for one replica. It retries every 30 s. A loop with errors: read opodcp_controller_errors_total{controller=…} and the pod log for that loop.

images-signed — untrusted-identity, bad-signature, absent. See Supply chain.

network-policy — unconfirmed. The API accepts a NetworkPolicy on every cluster whether or not anything enforces it. Test one node: run a pod, apply a policy with an empty egress: [], and check that it is cut off.

licence — N of M GPUs licensed. The cell holds more GPUs than the key allows; new capacity is refused E-LICENCE. Install a larger key on Settings → Licence; check a key with opodcp licence inspect.

config. A declared adapter that the DSN does not select, or a KV store URL with a password in it. Fix the named setting on the Connectors page and restart; type the KV store password as OPODCP_KVSTORE_PASSWORD.

Last updated · Source: content/docs/control-plane-operate/doctor.mdx · View as Markdown