Upgrade a cluster

Upgrade a cluster

Move every node to a new version of novad, one node at a time, while the cluster keeps serving.

An upgrade replaces one node at a time. A stopping node hands the streams it leads to the other nodes, and the new version starts from the same directory, as the same node. No record data moves. While a stream moves, its producer reconnects to the new leader once; in a test roll under a steady producer, the producer saw no error.

The same rule holds on machines, in Docker and on Kubernetes: never stop the next node before the last one serves again. That keeps two of the three metadata peers up, so the metadata store keeps working.

Before you start

  • Nodes and SDKs can be upgraded in any order, with the exceptions under Version rules.
  • Read the release notes for a stored-format change. While Nova is in its development phase, such a change needs a fresh start; see Reset incompatible storage.
  • Remove retired flags. A retired flag still works for one release, and the node logs novad: retired flag accepted for one release with the flag's name. The next release refuses it.
  • Start from a healthy cluster: every node prints SERVING in nova health, and nova oxia peers shows one leader and two voters.

Upgrade on machines or Docker

Get the new version

Pull the image tag you want, or build or copy the new novad binary. Images are tagged latest and sha-<commit>; pin a sha- tag in production, so every node runs the same build.

docker pull ghcr.io/supabase/nova:sha-<commit>

Replace one node

Stop the node, then start the new version with the same flags and the same volume or directory:

Docker
docker stop -t 75 novad-3 && docker rm novad-3
docker run -d --name novad-3 --stop-timeout 75 … ghcr.io/supabase/nova:sha-<commit> …   # the same flags and volume as before

On a machine, replace /usr/local/bin/novad and run sudo systemctl restart novad. The stop sends one SIGTERM, and the node hands off its streams before it exits; see Stop a node. Docker needs --stop-timeout 75 and systemd TimeoutStopSec=75 for that handoff.

Wait until it serves

nova --addr novad-3:7780 health
nova --addr novad-1:7780 oxia peers
SERVING  node=01a2047e-39ab-7322-9873-8152fa641c7c zone=az-3 version=… leading=0
novad-1:6660	leader
novad-2:6660	voter
novad-3:6660	voter

version= shows the new build. Move on only when the node prints SERVING and every peer is a voter again. Ask a peer for oxia peers: a member has no coordinator and refuses the command.

Repeat on every node

The order does not matter. In a test roll of three nodes, the two nodes that led nothing stopped in under a second and served again within 3 seconds. The node that led a stream stopped in 6 seconds and served again 6 seconds later, and its producer moved to another node.

To replace a machine rather than its version, add the new machine, drain and decommission the old one, then stop it. See Add and remove nodes.

Upgrade on Kubernetes

On Kubernetes the controller runs the roll. Change spec.image, or anything else in the node template, and it starts.

  1. The controller adds a replacement node first, in the zone that would have the fewest nodes once the old ones leave. The pool never drops below its size, and an uneven pool evens out.
  2. The first replacement is the canary. It runs alone for the canary window, 5 minutes by default. It must register, and no node may be left with streams that no other node can take. A canary that fails sets the condition UpgradeHalted, and the roll waits.
  3. After the canary, the controller keeps upgrade.width replacements going at once, at most a quarter of the pool.
  4. Each old node leaves through the same steps as a manual removal: drain, wait until it leads nothing, decommission, delete. The controller moves one node a step per pass and says what it waits for in the condition DepartureHeld.

To roll back, set spec.image back to the previous image. The same process runs in the other direction.

upgrade.widthDefault1
Replacements running at once after the canary, at most a quarter of the pool
upgrade.canaryWindowDefault5m
How long the canary must run cleanly before the rest of the roll
serving.reapAfterDefault10m
How long a node's pod can run without becoming ready before the controller starts to decommission it

When you upgrade the controller itself, the outgoing controller compares its own image with the one its Deployment now wants. If they differ, it stops changing resources and sets OperatorStale. If that condition stays, find out why the new controller is not ready.

Version rules

Producers built before the 1 MiB batch bound

A node refuses a producer session from an SDK built before the batch bound fell to 1 MiB and 1,000 records. The session ends when it opens, with InvalidArgument (HTTP 400):

dataplane: this Nova SDK predates the 1 MiB / 1,000-record batch limit; upgrade the SDK

Upgrade those producers before the nodes, or with them. The same applies later if you lower --max-batch-bytes or --max-batch-records: a producer whose batch is over the new bound sees that append fail with ErrBatchTooLarge, and the appends after it fail with ErrNotAppended. Those were not appended, so the application can send them again on a new producer.

Queues with persisted claims

Every claim row records the seat that last wrote it. A seat never overwrites a row that a later seat wrote; it ends instead and gives back what it took. Before a claim fails, its seat writes the claim's row, so only the seat whose write stands schedules the message's retry.

Nodes built before PR #362 (16 November 2026, commit cd3d90b3) do neither. While such nodes run beside new ones, the protection holds only between new nodes. An old node can overwrite its successor's claim row, so two workers can hold one message, or a message can be delivered again after its ack. Finish such an upgrade promptly.

Rolling back past the WAL key layout

New Standard ledgers key their WAL slots wal/<h>/<star>/<epoch>/<seq>, the hashed layout and the default of --wal-key-layout. With --wal-key-layout=star, they key them wal/<star>/<epoch>/<seq>. Each ledger records its own layout, and every node reads both. Express always uses the star layout.

Never run a build older than PR #489 while hashed ledgers hold slots

Builds before PR #489 (20 November 2026) derive the wrong keys for a hashed ledger. Such a build would fence a crashed node's hashed ledger as empty, which loses the records the node had acknowledged but not yet indexed. Its trims would also leave the ledger's slots behind for good. Builds from PR #489 on read both layouts, so a rollback to one of them is safe.

Retired flags

--insecure-auth is retired: a node accepts it, logs novad: retired flag accepted for one release, and it changes nothing. On Kubernetes, spec.auth.insecureAuth is read the same way. Remove both before you upgrade to the release that drops them.

Reset incompatible storage

While Nova is in its development phase, a stored-format change that a release cannot read needs a fresh start. Delete the metadata and the record objects together. Keeping only the metadata leaves references to missing objects. Keeping only the objects leaves data that background cleanup can never find.

  • On machines and in Docker, stop every node, delete each node's --dir (or its volume), and empty the bucket. Then start the cluster as new.
  • With Compose, docker compose -f deploy/docker/docker-compose.yml down -v removes the metadata store and RustFS together.

On Kubernetes

The operator owns every node and oxia object, and it scales them back as soon as you scale them down. So you stop the operator first, wipe, and let it rebuild everything. These steps are for an external metadata store, the shape the reference deployment runs. They use the namespace nova and a Constellation named nova; the operator derives every other name from it. In a script, wait with loops like the ones below, not with a grep pipeline under set -e, which ends the script when nothing matches.

Roll to the new image first

Set spec.image to the new release and let the roll finish. Every entry must show the new image:

kubectl -n nova get constellation nova -o jsonpath='{.status.stars[*].image}'

The operator renders each node's pod from the image its entry recorded. A wipe before the roll brings the nodes back on the old image.

Delete the workload Credentials

Delete them in every namespace where you created one for this cluster:

kubectl -n <workload-namespace> delete credentials --all

Do this while their keys still exist. Each Credential's finalizer revokes its key; after the wipe the key is gone, the revoke fails, and the Credential never goes away.

Stop the operator

kubectl -n nova scale deployment/nova-operator --replicas=0

Delete the node and auditor pods

kubectl -n nova delete pod -l 'nova.dev/component in (star,auditor)' --wait=false
while kubectl -n nova get pod -l 'nova.dev/component in (star,auditor)' -o name | grep -q .; do sleep 2; done

Stop the metadata store

Scale the data servers' StatefulSet and the coordinator's Deployment to zero. In the shape with no oxia.servers, scale the two standalone StatefulSets, nova-oxia and nova-oxia-registry, instead.

kubectl -n nova scale statefulset/nova-oxia deployment/nova-oxia-coordinator --replicas=0
while kubectl -n nova get pod -l 'nova.dev/component in (oxia,oxia-coordinator,oxia-registry)' -o name | grep -q .; do sleep 2; done

Delete the metadata store's state

Delete the coordinator's Lease and status ConfigMap. Both take the name in status.oxiaState.statusName, or oxia-cluster-status when it is empty. Then delete both volume claims of every data server, data-nova-oxia-N and wal-nova-oxia-N. The standalone shape has data-nova-oxia-0 and data-nova-oxia-registry-0 instead.

status=$(kubectl -n nova get constellation nova -o jsonpath='{.status.oxiaState.statusName}')
status=${status:-oxia-cluster-status}
kubectl -n nova delete lease/"$status" configmap/"$status"
for n in 0 1 2; do kubectl -n nova delete pvc data-nova-oxia-$n wal-nova-oxia-$n; done

Oxia writes a cluster instance ID into every data volume, so all of them must go. A volume that survives makes the new store loop on unexpected instance id. A Lease that survives makes the old and the new coordinator race for leadership.

Empty the buckets

aws s3 rm s3://<standard-bucket> --recursive
aws s3 rm s3://<express-bucket> --recursive   # once per express bucket

AWS CLI 2.35 or later empties directory buckets too.

Delete the object cache pods

kubectl -n nova delete pod -l nova.dev/component=objectcache

The cache still holds the old objects. The rebuilt nodes keep their identities and write new objects under the same keys, so a cache that survives would serve the old ones.

Start the operator

kubectl -n nova scale deployment/nova-operator --replicas=1

The operator recreates the metadata store and the nodes under the same identities. In about 2 minutes every node serves. Nodes restart one to three times while oxia elects its shard leaders, which is expected.

Then create the buckets and streams again, apply the Credentials again, and restart the consumers.

Delete metadata and objects together

A reset that keeps one side leaves a cluster that cannot read its data, or data that is never cleaned up.

If it goes wrong

SymptomLikely causeWhat to do
A node is killed during the stop, and its streams go through recoveryThe supervisor's kill deadline is shorter than the drain and closeSet it to 75 seconds; see Stop a node
oxia peers shows a peer joiningThe restarted peer is still catching upWait for voter before the next node
Producers fail with this Nova SDK predates the 1 MiB / 1,000-record batch limitAn old SDK met a new nodeUpgrade the SDK
UpgradeHalted on the ConstellationThe canary did not run cleanlyCheck the canary node's log; the roll goes on once a window runs clean
OperatorStale staysThe new controller is not readyCheck the controller's Deployment and image
After a reset, oxia pods loop on unexpected instance idSome oxia volumes survived the resetStop the operator again and delete every oxia volume claim and the Lease, as in On Kubernetes
After a reset, a Credential stays in TerminatingIt was deleted after the wipe, so its key could not be revokedDelete Credentials before the wipe next time; remove the stuck one's finalizer

See also

On this page