Skip to content
Opod

Endpoints

Rollouts and runs

Every change to an endpoint is a run with steps and proofs. Verified rollouts, canaries, eval gates, rollback, cancel, and how to read a run.

A run is one change to an endpoint, recorded step by step. Each run records what it takes the moment it takes it. A run that does not succeed gives back what it still holds, newest first.

Runs are new in 0.3.0

In 0.2.1 only a verified rollout or rollback is recorded, at /api/v1/rollouts and /api/v1/rollouts/{id}, with POST /api/v1/rollouts/{id}/rollback, …/promote and …/abort. The /api/v1/runs routes, runs of other kinds, the run log, cancel, the signature hold and E-RUN-ACTIVE are new in 0.3.0, and the /api/v1/rollouts routes go away.

KindStarted bySteps
rollouta verified rolloutvalidate, prefetch, apply, converge, probe, fabric-proof, smoke, canary, eval, promote
rollbacka rollback of a run, a revision or a model versionthe same as rollout
createan endpoint's first deploymentvalidate to smoke: no canary, eval or promote, because there is no older revision to compare with
editPUT …/planapply, pods rolled, serving
deleteDELETE /api/v1/endpoints/{id}remove objects, pods gone, GPUs freed, record removed
scalethe autoscalerdecide, pods ready, serving to grow; decide, pods stopped, GPUs freed to shrink
sleep, wakethe sleep tierdecide, engine asleep; decide, engine awake, serving
cleanupthe janitor or a person removing a remnantremove objects, pods gone

A failed rollout, rollback or create adds a rollback step: the give-back. Only rollout, rollback, create and edit hold an endpoint's one running slot. A second one while it runs is refused E-RUN-ACTIVE, and so is a plan edit (PUT …/plan).

In short

A verified rollout changes an endpoint and proves each step: the plan is accepted, the weights are on the nodes, the pods are ready, a real request is answered, and, when you ask for them, a canary and an eval pass. If any step fails, the control plane puts the previous plan back by itself. Use a rollout for every change to a serving endpoint that you cannot afford to get wrong.

When you need it

  • To change a serving endpoint's plan, image, engine or model version safely.
  • To pick up a new control-plane release, a changed chart value that touches pods, or new worker certificates. These wait for a rollout.
  • To test a new revision on one worker first (canary) or score it (eval gate).
  • To go back to an earlier plan (roll back).

Do it

  1. Start from the stored plan

    curl -s -H "$H" https://cp.example.com/api/v1/endpoints/<id>/plan > plan.json
  2. Change it and add the gates you want

    jq '.workers[].flags.max_model_len = "16384" | .canary = {holdSeconds: 600, weight: 10}' plan.json > new.json
  3. Start the rollout

    curl -s -H "$H" -H 'Content-Type: application/json' -X POST \
      "https://cp.example.com/api/v1/endpoints/<id>/rollouts?note=context%2016k" -d @new.json | jq '{id, state}'
    # {"id":"…","state":"running"}

    The answer is 202. To roll out the stored plan again with no change (new image pins, new templates), post plan.json as it is.

  4. Follow it to the end

    watch -n 10 "curl -s -H '$H' https://cp.example.com/api/v1/runs/<run id> | jq -c '[.state, (.steps[] | [.name, .state])]'"

    The id is the one the start answered. From 0.3.0 the route is /api/v1/runs/{id} (0.2.1 served it at /api/v1/rollouts/{id}), and opodcp endpoint rollout --wait chat waits for you.

Check it worked

A good answer: the run's state is succeeded, and every step is passed or skipped (a skipped step had nothing to do; its error says why). The endpoint's plan revision equals the run's toRevision, and its status reads serving with an empty rollingOut. In the console, Activity shows the run with its steps.

If it fails

Symptom or codeCauseFix
400 before any recordthe body has no worker and no gangpost the whole plan, not a bare {}
The run ends rolled-backa step failed and the old plan is backread that step's error, code and remedies
converge fails after 8 minutesa pod did not become Ready; the step's error is the last fact it read. A first pull of a large image can take longer (counted against the budget on 0.3.2 and earlier)read the run log (0.3.0) and the pod logs; for a pull, roll out again once the node holds the image
canary stays runningthe canary was too quiet to judge; event rollout.canary-unjudgedsend traffic, or end the hold with …/promote or …/abort
E-EVAL-GATEthe eval score is below minScorefix the model, or lower minScore
E-UNSIGNED, E-SIGNATURE, E-UNVERIFIEDimages.verify=enforce and an image failed the signature checksee Supply chain
E-RUN-ACTIVE (0.3.0)another rollout, rollback or create runs on the endpointwait, or cancel it
409 E-CANARY-DECIDEDa second promote or abort on one holdnone: the first decision stands

A verified rollout

# roll out the stored plan again: re-pins images to the chart's current digests and re-renders templates
opodcp endpoint rollout --wait --note 'take the new leader image' chat
 
# or post a changed plan
curl -s -H "$H" -H 'Content-Type: application/json' -X POST \
  "https://cp.example.com/api/v1/endpoints/<id>/rollouts?note=bigger%20context" -d @plan.json

opodcp endpoint rollout is new in 0.3.0. In the console: Roll out plan… on the endpoint page, or Edit plan & roll… (0.3.0). From the release after 0.3.6, while a run is active the endpoint page shows a banner with its kind, the step it is on and a link to its steps, and holds those buttons until it ends; the endpoint list names the run beside the state.

The body of POST …/rollouts is the whole desired plan. A body with no worker and no gang is refused 400 before any record is written, so a bare POST never re-rolls what is deployed: post the stored plan to do that. note is one line of at most 200 characters. The answer is 202 with the run. You need the operator role; in 0.3.0, a machine token with scope plans:write may start one too. A rollout runs these steps:

StepWhat it proves
validatethe planner accepts the plan: fit, licence, quota, image signatures, model approval. In 0.3.0 it also runs every refusal a create or a plan edit runs
prefetchthe plan's weights are on every target node's cache (a Job running opod fetch); skipped where the file is already there. From the release after 0.3.6, a plan with a speculative draft model (speculative.method: draft) also gets the draft pulled, and each node's unit says so (… · pulled draft <repo>:<file> in 18s, or draft cached); before, each worker downloaded the draft as its engine started
applythe objects are rendered and applied; the image pins are written
convergeevery planned pod is Ready on this revision; for a gang, every active gang is formed
probethe leader answers its probes
fabric-proofeach gang across machines clears the bandwidth floor
smokeone real request through the leader is answered (a scored list for rerank)
canaryone worker, or one whole gang, moves first and is judged against its siblings
evalan eval suite scores the new revision, when the plan has one
promotethe rest follow, and the revision is the endpoint's

Budgets: converge may take 8 minutes, smoke 3 minutes (it covers a wake from zero), and the whole rollout 30 minutes. A step that runs out of time fails with the last fact it read. From 0.3.3, time a pod spends pulling its image (the kubelet's Pulling event, no Pulled yet) is not counted against converge: the first pull of a 20 GB engine image no longer fails the rollout, and the 30 minutes still bound it. The endpoint's status lists those pods under pulling. On 0.3.2 and earlier, pre-pull a large image on its node first, or the first create of it can fail at 8 minutes.

A step's state is pending, running, passed, failed or skipped. skipped means the endpoint's shape gave the step nothing to do (no canary policy, no eval suite, no gang across machines); the reason is in error and it is not a failure. A failed step carries error and, when it was a refusal rather than a breakage, a code and remedies. On failure the previous plan revision is restored and the run ends rolled-back. A failed create has no previous revision: its workloads are removed and stay removed (the endpoint reads pending) until you roll it out again, edit its plan, or delete it. In 0.3.0 the reconciler leaves it removed, but a new key, an auth-policy or policy change, a route-key change or an autoscaler decision can still re-apply it. In the release after 0.3.0 (it arrives then), those writes are stored and do not bring it back.

A parked endpoint is woken for the rollout. converge, probe and smoke need a running pod. When KEDA owns the endpoint and has parked it at zero (floor: 0), the rollout holds it at its planned size (one group for a gang) for the run, publishes rollout.woke, and hands it back to KEDA when it ends. So an image or flag change, a security patch included, can be proven on an endpoint nobody is using. Under the embedded loop a parked endpoint is woken through the plan, which converge already reads. An endpoint whose every gang an operator parked by hand is not woken.

Under images.verify=enforce, validate refuses an image with no signature published beside it (E-UNSIGNED), one whose signature does not hold (E-SIGNATURE) and one whose signature could not be verified (E-UNVERIFIED). Under warn it records them. See Supply chain.

A verified rollout, step by step

Every control replays the run; dashed outlines show what will happen

Canary: judged good (siblings 0.5 %; illustrative judge: worse = more than double, under 30 requests = no verdict) · Eval: passes minScore 0.82

run.state: —
Each step records a proof the moment it passes. Only one rollout, rollback, create or edit runs on an endpoint at a time (E-RUN-ACTIVE).
passedrunning / holdingfailed · ↩ n = given back, in orderskipped (nothing to do)

Canary

canary: { holdSeconds: 600, weight: 10 }

During the hold, one worker runs the new revision and takes weight percent of requests (by plan revision, on a leader that supports it; otherwise its 1/N share). On a sharded endpoint the canary is one whole gang. The canary rolls in place: capacity dips by one worker during the hold, and no spare card is needed. The canary is judged by its error rate against its siblings' over the same minutes, from usage facts:

  • judged good → the rest follow;
  • judged bad → the rollout is compensated;
  • too quiet to judge → the hold does not end by itself. The step stays running and the event rollout.canary-unjudged is published once.

End a hold by hand: POST /api/v1/runs/{id}/promote (the rest follow; the proof says it was not judged) or POST /api/v1/runs/{id}/abort (fails the step E-CANARY-ABORTED and compensates). In 0.2.1 the routes are /api/v1/rollouts/{id}/promote and …/abort. The first decision stands; a second one is 409 E-CANARY-DECIDED, and a hold that is not running is 409 E-CANARY-NOT-HOLDING.

Eval gate

eval: { suite: mmlu-mini, image: registry.example.com/evals/mmlu@sha256:…, minScore: 0.82, timeoutSeconds: 900 }

The image is given the endpoint's gateway URL and a key, and must print a JSON object with a score field. A score below minScore fails the step E-EVAL-GATE and compensates the rollout. minScore: 0 records the score and gates nothing. A plan that pins a model version records the score on that version under suite.

A model signature that does not verify

The signature hold is new in 0.3.0. The prefetch step checks a model signature the repository publishes. Only a signature that is invalid holds the rollout (hold: "signature" on the step). An admin then decides:

  • POST /api/v1/runs/{id}/signature/accept — load anyway. The acceptance is recorded on the model version for that exact commit, so the same bytes do not ask again.
  • POST /api/v1/runs/{id}/signature/reject — fail the step E-MODEL-SIGNATURE-REJECTED. Nothing was applied yet.

A second decision is 409 E-SIGNATURE-DECIDED; a run that is not holding is 409 E-SIGNATURE-NOT-HOLDING. Nobody deciding ends the run at its 30-minute budget. See Supply chain.

Roll back

  • POST /api/v1/runs/{id}/rollback starts a new verified rollout to the plan that run captured at its start, image pins included. It answers 202. In 0.2.1: POST /api/v1/rollouts/{id}/rollback.
  • The endpoint page's History tab rolls back to any revision (0.3.0).
  • A model version rollback (POST /api/v1/models/{id}/versions/{v}/rollback) rolls every endpoint that pins a newer version.

Cancel

Cancel is new in 0.3.0.

curl -s -H "$H" -X POST https://cp.example.com/api/v1/runs/<id>/cancel

The running step ends at its next safe point, no further step starts, and the run gives back what it took; it ends cancelled, or failed when a give-back failed. It answers 202 with the run. ?force=true stops the run's pods with a one-second grace period instead of their own. A delete cannot be cancelled (E-RUN-NOT-CANCELLABLE); a run that already ended is 409 E-RUN-FINISHED.

When the control plane restarts mid-run

A verified rollout, a rollback and a create resume. The run's journal says which step it stopped at, every step is safe to run twice, and the new control-plane process continues from the first step that has not passed. A run it cannot resume (its endpoint is gone, or its target plan cannot be read) ends failed, and the endpoint keeps what was applied.

The other kinds (scale, sleep, wake, delete, edit, cleanup) only follow a decision that was already made. One that nobody has followed for two minutes ends failed with the reason "a control-plane restart", and gives back what it held. What happened next is on the endpoint's events.

Read a run

curl -s -H "$H" "https://cp.example.com/api/v1/runs?endpoint=<id>&kind=rollout,rollback&limit=10"
curl -s -H "$H" "https://cp.example.com/api/v1/runs/<run id>" | jq '.state, .steps[] | {name, state, proof, error, code}'
curl -s -H "$H" "https://cp.example.com/api/v1/runs/<run id>/log?format=text"

GET /api/v1/runs answers newest first: kind takes a comma list, limit is 1 to 1000 (default 100). A team-scoped caller sees only runs of their team's endpoints.

Run fieldMeaning
id, kind, statestate is running, succeeded, failed, rolled-back or cancelled
endpointId, endpointName, cellwhat it changed
by, notewho, and the one-line reason; a rollback's note names the run it undoes
fromRevision, toRevisionthe plan revisions it moved between
steps[]name, state, startedAt, finishedAt, proof, error, code, remedies, decision (a canary or signature decision), hold
acquired[]what it took: kind, ref, detail, from, to, at, and releasedAt, release once given back
cancelwho asked to cancel it, and when
createdAt, updatedAt—

The log holds each step's lines: its start and end, every change a waiting step saw, the units it touched, and what Kubernetes said about the pods. JSON (the default) is {lines, next}: pass next back as after to read only new lines, and step=<name> to read one step. format=text is one line each under a header naming the run. The console's Activity page shows every run with its steps; Copy writes the text form.

The digests a run pinned are not on the run record: read plan.images on the endpoint and the apply step's proof.

Changes that wait for a rollout

A serving pod is never restarted by an unattended apply. These reach running pods only through a rollout (or any plan edit):

  • a new control-plane release that renders pods differently (doctor row template-drift);
  • a changed chart value that touches pod templates: tolerations, resources, the leader pool, the trace collector;
  • worker certificates for mTLS;
  • a new image pin.

Embedded TLS certificates are re-minted by a rollout whose apply step finds the certificate within endpoints.tls.renewDays of expiry. The fingerprint then changes. The alert-rule metric endpoint.cert_expiry_days says when a rollout is due.

Events

In 0.3.0, every run publishes run.started, run.step, run.step-progress and run.finished, each with its kind, and run.cancel-requested when someone cancels it, on GET /events and in the audit record. A verified rollout also publishes rollout.started, rollout.step, rollout.finished, rollout.failed and its canary and eval events (rollout.canary, rollout.canary-verdict, rollout.canary-weight, rollout.canary-promoted, rollout.canary-aborted, rollout.canary-unjudged, rollout.eval), plus rollout.signature-hold, rollout.signature-accepted and rollout.signature-rejected from 0.3.0.

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