Upgrading
How to move a Reeve installation to another release and back. This page holds the rules that apply to every upgrade. What a particular release changes, and any step it needs, is in the changelog. Read the entries of every release between the running build and the target before you start.
Reeve 1.0.0 is the first release, so there is nothing to upgrade from yet. The rules below describe how later releases move: which roll replica by replica, which need every replica stopped first, and what the backend does on its own at boot.
Version compatibility
Every backend assembly reports one host version, set in backend/Directory.Build.props. It is the host's capability and contract line: the number a plugin manifest's minBackendVersion and a widget or blueprint's compatibility.minAppVersion are checked against. It is not a marketing version.
- A release build reports its tag (
1.0.0). A build from another commit reports the version inbackend/Directory.Build.propswith build metadata after a+. The compatibility check drops the metadata, so such a build of1.0.0meets aminBackendVersionof1.0.0. - A stable image reports a release version. A release-candidate image reports its
-rc.Nversion, and a prerelease label sorts below the equal release, so a release candidate of1.1.0does not meet aminBackendVersionof1.1.0. /versionshows what a backend reports.
The window: ReeveRollFrom
A build also carries ReeveRollFrom, the oldest host build it may serve beside. It is a plain X.Y.Z at or below the build's own core, and the build fails to compile otherwise. Empty means the exact build only. A build accepts every build whose version is at least its ReeveRollFrom, with build metadata ignored. The window has no upper bound.
A release sets it with a <ReeveRollFrom> property in backend/Directory.Build.props, or with the REEVE_ROLL_FROM build argument of the backend Dockerfile, and states it in its changelog entry. Release 1.0.0 has no predecessor, leaves it unset, and runs only beside builds of its own version.
Whether a release rolls follows from that window:
- Inside the window, every replica is replaced one at a time while the others serve (rolling).
- A full-stop release (one whose
ReeveRollFromis its own core) and a jump from below the window both need the full stop.
To check before starting, compare the running version (/version, or the Cluster tab) with the new build's ReeveRollFrom. If you get it wrong, the start-up check is the guard: a replica outside the window refuses to start (exit 76) and nothing has migrated.
Before you start
- Take a database backup and verify it, together with the Data Protection key ring (backup and restore). Rolling back below a release's window is a restore, and some releases encrypt data irreversibly on their first start.
- Back up retained workload volumes. Mark the claims worth keeping with the storage-retention annotation before the chart upgrade, or a pruning sync deletes them.
- Pin the release with a chart version from the registry, which fixes the chart and its images together, or with an image tag. Do not use
latest. On a mutable tag withimagePullPolicy: Always, a pod re-created during the upgrade pulls whatever the tag points to by then. - Check that no plugin update or install is running. While host builds are split, an install or update answers
409 host_builds_mixed. One already running finishes or halts first (a plugin update that halts). - Check that the fleet is healthy: every replica
activeon the Cluster tab and nocluster.start_refusedalert. - Confirm someone holds
workloads.approve, so a workload that asks for consent can be approved. - Read the changelog of every release in between, for a prerequisite or a behaviour that differs while the builds are mixed.
- Render the chart with your values (
helm template). It refuses a missing secret or a shipped placeholder and fails the render before anything changes.
After the upgrade:
- Confirm the migrations applied.
- Redeploy any sidecar the changelog names.
- Re-grant any permission a release deliberately revoked.
- Confirm each workload reads healthy with a live gateway session. A running pod is not the health signal.
- Confirm nothing sits in a terminal rollback-failed state.
What happens on its own
The backend applies pending migrations at boot, then runs the reference-data seeders, the bootstrap administrator and repository seeds. In a fleet, one replica takes the boot lock and initialises while the others wait and retry. Nothing has to be run by hand.
Migration order. Under the boot lock, the migrators run in this order: the cluster library, the workflow library, the host, the workload engine.
Separating migration from serving. dotnet Reeve.Api.dll --migrate-only initialises and exits. On a fleet, pair it with Database:Startup:RunMigrationsOnStartup=false on the serving replicas. The chart's migration Job (databaseMigration.enabled, on by default) runs it as a pre-install,pre-upgrade hook and an Argo CD PreSync hook, under the <fullname>-db-migrate ServiceAccount. --migrate-only takes no lock around the workflow library's migrator, so run one migrate Job at a time. A serving replica that does not migrate checks the workflow schema and exits with code 75 when it is not migrated, so run the Job first.
Start-up waits. The host waits for PostgreSQL up to Database:StartupWaitSeconds (0 to 600, and an invalid value is refused naming the key) and for Redis up to Redis:StartupWaitSeconds. Neither wait counts as a failed boot. A transient PostgreSQL error is a refused connection, or a pooler or server code 08xxx, 53300 (too many connections) or 57P01 to 57P03. The whole start is bounded by Hosting:StartupTimeoutSeconds (300 s, range 30 to 3600), after which the process exits with code 75. Raise it together with the chart's startupProbe if a large installation needs longer.
Exit codes.
| Code | Meaning |
|---|---|
| 75 | A boot failure. It counts towards safe mode: after Bootstrap:AutoEngageThreshold of them in a row, the next boot comes up in safe mode. A PostgreSQL wait that expires also exits 75 and is not counted. |
| 76 | A refusal by the start-up window check. Never counted. |
| 78 | A refusal of the deployment's own configuration: an invalid Managed: section or directory, or a setting that a Managed: section replaced. A restart cannot cure it, so it is never counted. |
Pre-deploy workflow check. dotnet Reeve.Api.dll --compilation-sweep migrates, compiles every workflow's current and draft version under this host's block catalogue, prints those that do not compile, and exits without starting hosted services, so nothing runs a workflow. Blocks that WASM plugins provide register from a hosted service the sweep does not start, so a workflow that uses one reads as not compiling there. The sweep runs the start-up window check.
Plugin installs wait for the artifact store. While the plugin artifact store migrates, plugin approvals and installs answer 503. Rejecting an update is not blocked. It advances the baseline without installing.
Migrations that refuse
A migration that meets data it cannot resolve stops rather than guess, and applies nothing. The changelog names a release whose migration can do that, with the query that finds the offending rows beforehand.
A database outside the recognised schema states of the cluster library is refused at boot with ClusterConfigurationException (UnknownSchemaState). Restore a backup taken by a Reeve release, or start from an empty database.
Settings the upgrade checks
| Setting | Requirement |
|---|---|
| PostgreSQL | 18 or newer. The cluster library's migration refuses an older server. |
| Redis | 8.4 or newer. A backend whose Redis reports an older version refuses to start and names it. |
statement_timeout |
0 for the cluster library's role, the application's role, the database and the session. |
transaction_timeout |
0 as well. |
Redis maxmemory-policy |
noeviction on an external Redis. The bundled Compose and Helm Redis do. A volatile-* policy refuses the start, because the host registers Redis claims. |
| Replica id | A distinct one on every process, clustered or not: REPLICA_ID or Workflow:Engine:ReplicaId, including the migration Job (the chart uses reeve-migrate). A host without one exits before it is built, naming both settings. The chart derives one per pod name. The Compose base service defaults to reeve-backend, and the multi-replica overlay assigns one per service. |
Redis:ConnectionString |
Required outside Development and E2E. The migration Job needs no Redis. |
ForwardedHeaders |
Unparseable entries fail the boot: a hostname, a bad prefix, a CIDR in KnownProxies or a bare address in KnownNetworks. |
A non-zero statement_timeout is refused with StatementTimeoutNotZero, on the cluster library's connections at start and on the application's fenced, claim and slot transactions. Check it with SHOW statement_timeout; as that role, and clear it with ALTER ROLE <role> RESET statement_timeout; and ALTER DATABASE <db> RESET statement_timeout;. Set the Redis policy with CONFIG SET maxmemory-policy noeviction and in redis.conf.
The workflow library's recovery sweep takes the host's settings Workflow:Engine:ResumeIntervalSeconds, ResumeMaxBatch and RefusedReplayGiveUpAfterSeconds.
Deployment-managed sections (Managed:*, see managed configuration) that a release introduces are ignored by a replica of the previous build. Declare a new section only after every replica runs the build that knows it, because during a roll an older replica keeps reading and writing the stored settings the section replaces. A set Managed:Directory that is missing or unreadable refuses the boot.
Upgrading a release rolls replica by replica
A multi-replica installation upgrades inside the window by a rolling update. The replicas of the old build are replaced one at a time, and both builds run side by side until the last old one is gone. A single replica has nothing to roll beside and restarts.
The chart's cluster.fullStopUpgrade defaults to false, which renders the rolling strategies. A plugin roll waits for a fixed fleet size, so replicaCount (or an explicit workloads.pluginRoll.fleetSize) is the fleet. coordination.clustered derives from it and is true above one replica.
In this page <fullname> is the release name, or <release>-reeve when the release name does not contain reeve.
Helm, StatefulSet (persistence.plugins.mode: perReplica)
The StatefulSet renders updateStrategy: RollingUpdate. Apply the new chart version, or set the image tag, and the controller replaces the pods from the highest ordinal down, one at a time. It replaces the next pod only after the new one is ready. Readiness is the cluster library's serving state, so the new replica has joined and been admitted by then.
helm upgrade <release> oci://ghcr.io/reeve-iot/charts/reeve --version <version> -f values.yaml
kubectl rollout status statefulset/<fullname>-backend --timeout=30m
To try the new build on one replica first, set cluster.rollingUpdate.partition to replicaCount - 1. Only the highest ordinal takes the new template. Watch it for as long as you like, then lower the partition one step at a time, or to 0. The partition applies only to a rolling StatefulSet.
The chart's migration Job runs before any pod is replaced and meets the old fleet. The new build admits it, because the old build is inside its window.
Helm, Deployment
A clustered Deployment (persistence.plugins.mode not perReplica, replicaCount above 1) renders RollingUpdate with maxSurge: 0 and maxUnavailable: 1. One pod is stopped, its replacement starts and must be ready, then the next pod follows. No spare pod starts, so the fleet never exceeds replicaCount. A single replica renders Recreate.
The PodDisruptionBudget is rendered when replicaCount is above 1 (podDisruptionBudget.enabled overrides). It guards evictions only. Scaling to 0 and deleting pods, which the full stop does, ignore it.
GitOps (Argo CD)
Each release publishes its chart. A deploy is a change in your GitOps repository that moves the application's chart version (targetRevision) to it, as in the Argo CD example. With cluster.fullStopUpgrade unset or false, the sync rolls the StatefulSet or the Deployment as above.
Pin the next release only once every backend pod runs the previous one and is ready. A pin over an unfinished roll halts at its first new pod if the old build is below the new window. A rollback is a revert of that change. Leave self-heal on, and pause automated sync only for the full stop, which scales to 0.
Compose
Compose has no controller, so replace the backends yourself, one at a time. Pass the same -f files the stack runs with (docker-compose.yml, plus docker-compose.multi.yml and your overlays).
docker compose -f … build # builds the new release from your checkout
for svc in backend3 backend2 backend; do
docker compose -f … up -d --no-deps "$svc"
read -r -p "wait until $svc is active on the Cluster tab, then press Enter " _
done
docker compose -f … up -d # the frontend, the balancer and anything else whose image changed
--no-deps leaves the database and Redis running and replaces only that container. A clean stop takes up to 214 s, so the requests it was serving finish first. Replace the next replica only once the new one is active, which means it has joined, passed the start-up window check and serves.
The final up -d also replaces the database container when a release moves the pinned TimescaleDB image. The database keeps the extension version it was created with, because the image still carries the libraries of older versions. After a backup, bring it to the image's version with ALTER EXTENSION timescaledb UPDATE; as the first command of a fresh session:
docker exec -it <container> psql -X -U <user> -d <database> -c 'ALTER EXTENSION timescaledb UPDATE;'
A restore needs the backup's TimescaleDB version on the target server (backup and restore).
What you see during a roll
- The Cluster tab lists replicas of two versions, and System status shows the Version box as "Needs attention" with the versions and how many replicas run each. That is the expected state. It clears when every live replica reports one version.
- A new replica that cannot start beside an old one is listed
Refusedand raisescluster.start_refused. Nothing migrated and nothing split. Stop the roll and take the full stop. - A plugin install or update answers
409 host_builds_mixed, and the auto-update pass skips its candidates, until the last old replica is gone. - A gated change turns its new behaviour on once every replica runs the new build, not at the first new replica. A screen of the new web app that needs a new endpoint fails on a replica of the old build until the roll ends.
What clients see.
- Open tabs keep the web app they loaded, and the API keeps the shape the previous app expects.
- A tab whose lazy chunk a deploy removed reloads once. A repeat within its guard window is left to the error boundary, so a missing chunk cannot loop.
- An older backend inside the window may answer 404 without an error code, which the client reads as "the row is gone". An enum value the client does not know renders as its raw token.
- A configuration-flow submit that lands while another replica takes the flow over, or while its plugin type is still loading, is retried for a window that outlasts a replica stop: the chart's 214 s grace period, a 30 s lease that outlives a kill, and 5 s to spare. A deployment that shortens those values shortens that guarantee.
- A cluster refusal at admission is retried once after its
Retry-After(5 s). - The mobile app's HTTP timeout is 130 s, and long actions such as an action-flow submit wait past the host's 180 s polling-submit budget, so the client never gives up first.
What a browser caches. The frontend's nginx answers no-cache for the app shell (index.html and every deep link), sw.js, the manifest and every other unhashed public file. Only the content-hashed files under /assets/ are cached, for a year, as immutable. /api/ and /hubs/ carry the backend's own headers. The service worker is stamped with a build id, so a new build installs a new worker, which deletes the previous build's cache. A reverse proxy or CDN in front of the frontend must not add its own caching to the shell or to sw.js.
Behaviour that differs while builds are mixed
Anything a replica derives from what it received, rather than reads from a shared store, can differ between builds for the length of a roll.
Fire de-duplication. The claim that collapses one physical device event into one automation fire is derived this way. Its key is a hash of the event's cluster-stable identity and the trigger that fired. A release that changes what goes into that hash makes an old and a new replica claim different keys for the same event, so one event can fire an automation twice until the roll ends. The claim expires after Workflow:Engine:FireDedupWindowSeconds (5 s by default, at most 300). There is no second store, so the cost is at most one extra fire per key in flight, once. A Single automation is not affected, because its own run lock collapses the copies. The changelog names each release that changes the key.
Matter bridge. The scene export flag, the light, plug or switch choice and a vacuum's area labels are read by the replica that owns the bridge link and by its sidecar. As link ownership moves between old and new replicas, scenes can appear and disappear in the paired ecosystems. An older sidecar ignores fields it does not know until it is redeployed.
Rolling back during a roll
While an old replica is still active, move the pin back. Apply the previous chart version, run kubectl rollout undo statefulset/<fullname>-backend (or deployment/…), or run the Compose loop above with the old images. The old build is inside the new build's window, and no gate can have raised the version floor above it while an old member still held an active lease. A new pod that never becomes ready stops the roll. After the template is reverted, delete that pod and the controller re-creates it from the old template.
Once the last old replica has drained, a gate may have raised the floor above the old build, which then stays joining with activation.version-floor. Going back is then a full stop with the floor lowered (rolling back after a floor raise), and rolling forward is preferred. A rollback below the release's ReeveRollFrom is a restore of the backup taken before the upgrade.
Frozen names
Change-log types, owned-unit kinds, placer capability names, Ask kinds, bus channels and SignalR hub methods must stay the same between an old and a new build for a roll to work. A release that has to remove or rename one adds a new name and keeps the old one through a contract step, or becomes a full-stop release by raising ReeveRollFrom to its own core. The host roll harness rolls forwards and back between the release a build's ReeveRollFrom names and the candidate.
The full stop
Stop every replica on the previous release, then start the new one. Expect the downtime of one restart.
The full stop is for the two cases outside a build's window: a full-stop release, and a jump from below the new build's ReeveRollFrom. A mixed fleet outside the window is unsafe in both directions. A replica of the previous release may write without appending to the change log, and the new build has no backstop that would catch it.
On Helm, set cluster.fullStopUpgrade: true for the upgrade, which renders Recreate and OnDelete. Set it back to false afterwards, so the next release rolls.
How start-up enforces it
Before it migrates anything, a replica reads reeve_cluster.member directly, judging leases on the database clock. It refuses to start while any other replica holds a lease, in any state including draining, on a build outside its window.
- The replica's own id is left out, because its row can only be a dead process's. The migration Job and the sweep join nothing and leave nothing out, so a Job started with a live replica's id counts that replica.
- The check runs in the migration Job (
--migrate-only), in a replica that migrates at start-up and in one that does not, and in--compilation-sweep. The operator commands (--cluster-skip,--cluster-floor) do not run it. - A fresh database has no
reeve_clusterschema and no members, so it always boots. - A build with an empty
ReeveRollFromaccepts only the identical informational version. A release build1.0.0and a build1.0.0+<build>of one commit are different builds.
What a refusal looks like. The process writes [window] Refusing to start: Replica '<id>' runs <version> (<state>) and holds a lease; … to standard error and exits with code 76. It adds nothing to the replica's failure count, so repeated refusals never engage safe mode. The reason and time are written to the replica's bootstrap.replica_boot_state row behind the prefix [window] . The migration Job and the sweep record nothing. A refusal at the first read has migrated nothing, and one at the floor raise comes after the cluster library's migrations. Either way the replica has not joined, so it causes no split.
Where you see it.
- The Cluster tab and the Overview's cluster box list the replica as
RefusedwithRefused to start <time>: <reason>. - The alert
cluster.start_refused(Warning, one per replica) is raised while the replica's latest boot-state record is a refusal younger than 10 minutes. It clears when the replica starts, when a boot failure replaces the reason, or when retries stop for 10 minutes. - While the latest record is a refusal,
cluster.boot_failingis not raised for that replica. - A refused replica is not in the cluster registry, so like any silent replica it holds the clears of the other status alerts until it starts or leaves the missing-replica window.
Retries. The orchestrator retries: Kubernetes restarts the container, and Compose's restart: unless-stopped starts it again. A retry is admitted once the old replicas' leases have ended (Cluster:LeaseTtl, 30 s, after the last of them stopped). A refusal that does not clear means a replica of another build is still running. Stop it.
The floor raise. With ReeveRollFrom set, the replica raises the cluster library's version floor to ReeveRollFrom after the library's migrations, so no binary below it activates again. A member below it that holds a lease makes the replica refuse with code 76 until that lease ends. That member joined after the first read, or it is this replica's own stale row from a killed older process. A failure of the member read, or a lock timeout in the floor raise, is a boot failure (75). The floor raise also closes two gaps of the exact window: two different builds that both pass the first read before either joins, and an old fenced replica that rejoins after a database failover.
The migration Job
The chart's migration Job runs before any pod is replaced. With databaseMigration.enabled (the default) the Job is a pre-upgrade and PreSync hook, so it always meets the old fleet and is refused (exit 76), and the upgrade or sync fails there. Neither the Job's backoff nor the sync's retry clears that while the old pods run.
With the Job on, the full stop is:
- Scale the backend to 0.
- Wait until every pod has terminated, and for
Cluster:LeaseTtl. - Apply the chart or sync. The Job then finds an empty fleet.
- Scale back to
replicaCount.
With the Job off (databaseMigration.enabled: false and databaseMigration.runMigrationsOnStartup: true), the first start migrates and the update strategy does the stop.
On a mutable image tag with imagePullPolicy: Always, any backend pod re-created after a full-stop image is pushed (an eviction, a crash) refuses to start while an old one still holds a lease. It is restarted until the full stop has happened. A published chart version or a pinned image removes the surprise.
Full stop per deployment
Helm Deployment. Set cluster.fullStopUpgrade: true, and the chart renders strategy: Recreate. On an unchanged tag an upgrade changes no pod template, so run kubectl rollout restart deploy/<fullname>-backend, which honours Recreate.
Helm StatefulSet (persistence.plugins.mode: perReplica). With cluster.fullStopUpgrade: true the chart renders updateStrategy: OnDelete. A new chart or image then changes no pod by itself, and neither does kubectl rollout restart. A pod takes the new template whenever it is re-created, one that crashed or was evicted included. The full stop is:
kubectl scale statefulset/<fullname>-backend --replicas=0
kubectl wait --for=delete pod -l app.kubernetes.io/instance=<release>,app.kubernetes.io/component=backend --timeout=240s
# wait for Cluster:LeaseTtl, then apply the new chart or image tag
kubectl scale statefulset/<fullname>-backend --replicas=<replicaCount>
The wait's timeout must exceed the pod's 214 s grace period. With the migration Job on, this is the only full stop. With the Job off, deleting every backend pod at once after the chart is applied is a full stop too. podManagementPolicy: Parallel re-creates each pod as soon as its predecessor is gone, and a new pod that meets an old one still draining refuses (exit 76) until the old ones have gone.
Switching the flag. Turning cluster.fullStopUpgrade on or off applies with no patch, under a client-side apply (Helm 3) and a server-side apply (Argo CD with ServerSideApply=true, Helm 4) alike. The rolling render owns the rollingUpdate fields the API server can default (partition and maxUnavailable), so the apply that switches to OnDelete removes them.
An API server whose MaxUnavailableStatefulSet feature is off drops maxUnavailable, so Argo CD must compare on the API server. Give the Application the annotation argocd.argoproj.io/compare-options: ServerSideDiff=true (Argo CD 2.10 and later, and the example Application carries it), or run Argo CD 3.6 or later with ServerSideApply=true. Below 3.6, ServerSideApply=true alone compares locally, and the StatefulSet stays OutOfSync on such an API server.
The one refusal. only allowed for updateStrategy 'RollingUpdate' comes from the first server-side apply that turns the full stop on over a StatefulSet that was last applied client-side (Helm 3, or an Argo CD Application without ServerSideApply=true). Sync once server-side with the full stop off, and turn it on in a later sync. Where the release itself needs the full stop, pause automated sync first as the next item shows (self-heal would restore the block), then run this once before the sync:
kubectl patch statefulset/<fullname>-backend --type=json -p '[{"op":"remove","path":"/spec/updateStrategy/rollingUpdate"}]'
Helm StatefulSet under a GitOps controller with self-heal. The controller owns spec.replicas and reverts a manual scale. Pause automated sync first, on the application and on any parent application that would restore it.
- In Argo CD,
argocd app set <app> --sync-policy nonepauses it (or setspec.syncPolicy.automated.enabled: false).argocd app set <app> --sync-policy automated --self-heal --auto-pruneresumes it. - An Application generated by an ApplicationSet gets its sync policy back from the template. Set
spec.template.spec.syncPolicy.automated.enabled: falsein the ApplicationSet instead, andtrueto resume. - Do the steps above and re-enable sync, child first.
- Setting
replicaCount: 0in the values instead also scales the frontend whenfrontend.replicaCountis unset.
A GitOps application that ignores .spec.updateStrategy hides the StatefulSet's strategy from its diff. A change to OnDelete then reaches the cluster only when something else on the StatefulSet syncs. Remove that ignore entry.
Compose. Pass every command the -f files the stack runs with.
- Build and pull the release's images (
docker compose -f … build, thendocker compose -f … pull --ignore-buildable). - Stop only the backends, leaving the database and Redis running:
docker compose -f … stop backend, addingbackend2 backend3with the multi-replica overlay. - Run
docker compose -f … up -d, which recreates every service whose image changed. The overlay's peers run the imagebackendbuilds.
Shutdown windows
| Deployment | Stop sequence |
|---|---|
| Compose | The backend stops within 204 s (Hosting:ShutdownTimeoutSeconds). The container is killed at 214 s. |
| Chart | preStop sleeps 5 s first, so the gateway stops routing to the pod before it stops accepting. The backend then stops within 199 s, and the pod is killed at 214 s, counted from the start of the sleep. |
A stopping replica first finishes the requests it took from peers (5/16 of the timeout), then the cluster library drains. A custom manifest needs a grace period above the sum of 5/16 of the timeout plus StopBudget + ProxyReadTimeout + 2 x RenewTimeout (131 s with the defaults), and a shutdown timeout of at least that sum. The compiled default is 204 s, so only the grace period needs setting. A chart backend.shutdown pair below the sum does not render. With the defaults, 191 and 206 are the least that render, and the grace period is checked less the preStop sleep.
The published chart
Every release tag publishes the chart as an OCI artifact, oci://ghcr.io/reeve-iot/charts/reeve, at a version equal to the tag without its v (1.0.0, or 1.1.0-rc.1 for a release candidate). Its default image tags are the tag's images, so pinning the chart version pins the images too. Only a release moves latest, never a candidate. image.backend.digest, image.frontend.digest and adapters.matterBridge.image.digest name an image by digest instead of by tag. A registry without TLS, such as a mirror you run, needs --plain-http (helm pull oci://… --plain-http, or an insecure OCI repository in Argo CD).
Rolling back after a floor raise
A release that gates a change raises the cluster's version floor above the build before it, and a release with a ReeveRollFrom raises it at start-up. An older replica then stays joining with the readiness reason activation.version-floor and never serves (reeve_cluster_activation_refusals_total{reason="activation.version-floor"} rises).
If the old build is below the release's ReeveRollFrom, there is no rollback: restore the backup taken before the upgrade. Otherwise rolling forward is preferred, and going back is a full stop:
-
Stop every replica of the new build. The floor command refuses (exit 3) while any member holds a valid lease in a state other than
joining. A cleanly stopped or killed replica blocks it until its lease ends (Cluster:LeaseTtl, and a clean stop marks the member draining without ending the lease), so wait and run it again. The check is a read before the write, so a replica that starts, or is still joining, is not seen and does not replace the stop. -
Lower the floor with the host binary, which does not start the host or join the cluster:
--cluster-floor lower-version --version <X.Y.Z|none> --by <name>. Pass the old build's plainX.Y.Z(the core of its/version), ornoneto clear the floor.--cluster-floor lower-protocol --protocol <N> --by <name>does the same for the protocol floor. Run it from a one-off container of the backend image with the backend's environment and aREPLICA_IDno member uses:docker compose run --rm -e REPLICA_ID=floor-cli backend dotnet Reeve.Api.dll --cluster-floor lower-version --version 1.0.0 --by opsOn Kubernetes, use a pod from the backend image with the backend's secrets, as the migration Job is.
-
Start the old build. A replica already stopped at
joiningis admitted by its next activation round, without a restart. -
Accept what the changelog says an older build makes of the data written since. The command lowers a number and undoes no data.
--cluster-skip opens, closes or lists change-log skips for an entry no replica can apply. It exits 0 on success, 2 when the library refuses an open, and 1 for a malformed command or an error. A listing from a lagging member may still show a closed skip. Both commands strip control characters from the fields they print. They are described with the other host-binary commands in running multiple replicas.
Plugin compatibility
A plugin manifest declares an inclusive minimum and an exclusive maximum host version. A minimum that is not a version is refused. Repositories:CompatibilityEnforcement defaults to Enforce: an out-of-range plugin is not loaded, and the refusal is audited, naming the range. Warn loads it anyway. The check runs at install, at reload and at cold start. A plugin that declares no compatibility loads everywhere.
At install, under Enforce, an install refuses with incompatible_host_version before anything is written: no artifact is fetched, no version pin moves, and the running instance keeps serving its version. Under Warn the install proceeds. If the instance's hot reload then refuses, the UI says the backend is too old and names both versions, and the instance carries a Backend too old badge until the backend is upgraded. A restart re-runs the same comparison and does not help.
Auto-update is stricter: Warn is an override for an operator's own install. Auto-update judges every release as Enforce would, in both modes. It takes the newest release this host can load, and when none newer than the baseline is loadable, it holds the subscription on the newest one. The marketplace page shows the hold as Needs a newer Reeve backend (or Needs a newer .NET runtime) with Approve disabled. Upgrading the backend releases it on the next sync, and Reject skips that version.
An instance whose version loaded only because of Warn and whose start then fails is faulted as incompatible_host_version, naming the floor and the start error, and carries Backend too old. The host does not fall back to an earlier version, because the installation record pins one version and loading another would run code the cluster did not install. Upgrade the backend, or install a release this host supports from the marketplace page.
A version the replica refuses to register for a reason the next boot refuses again (the artifact is not the lane's kind, a module path escapes the install directory, a signature check fails) carries Rejected naming that refusal, not Requires restart.
A WASM instance whose installed version requires a configuration field its saved configuration lacks, with no default, does not start. Its health reads Faulted and names the fields. A required field with a default is filled at start without saving it.
A plugin's minimum host version is derived from the plugin SDK its build resolved. Bumping the SDK raises that floor silently: nothing fails at build or publish, and the plugin refuses to install on an older host. A freshly published plugin that will not install on a host that ran it before is almost always this.
An existing installation does not gain a newly requested permission on upgrade. The new code path is denied until an administrator re-grants it, so a plugin missing a capability degrades to an actionable unhealthy state. A release that newly marks a permission as required parks instead of installing.
Auto-update is opt-in per instance and accepts only strict three-part versions. Following patch releases stays within the same minor, and following minor releases stays within the same major. Neither crosses a major, and a prerelease ranks below its release core, so a stable install is never moved onto one. Auto-update skips a candidate the host cannot run rather than retrying it every sync. A failure never marks the running instance broken: it is audited, the old version keeps running, and the loop continues.
Removing a repository deletes the repository's cached release metadata and uninstalls nothing installed from it. It retires the auto-update subscriptions that follow it (audited as plugin.autoupdate.unsubscribed). It is refused while an active update loads from it (below).
Hot installs and live swaps
A hot native install reads Requires restart when the installed version's workflow blocks, triggers or alert subscribers have not been loaded at that version, or when the ones the booted version registered are still loaded.
Workflow blocks. Each replica swaps them live when every block it has registered for the plugin is exported again with an equal shape and the instance reload succeeded. A replica logs one of:
blocks swapped liveblocks after restart: <reason>(a changed or dropped block)blocks not swapped: <reason>(a failed reload or start, which a retried turn can still swap)
A plugin whose only boot-only parts are blocks then reads no Requires restart. The instance badge and a roll turn's reason show the first two. After a failed reload or start they name that call, and blocks not swapped is only in the replica's log, as is every outcome of a plugin without instances. A shape change or a dropped block still needs a restart of each replica.
Alert subscribers. Each replica swaps them in place after its instance reload succeeded. A replica logs alert subscribers swapped live, alert subscribers after restart: <reason> (a subscriber that could not be built or activated) or alert subscribers not swapped: <reason>. A plugin with blocks and an alert subscriber (Ntfy, Discord webhook) reads no Requires restart when both swap. An uninstall withdraws the plugin's subscribers on each replica without a restart.
Anomalous updates
Before any bytes are written, the candidate is compared with the installed version. Any of these makes the install return a conflict listing every anomaly:
- a changed signing key
- a dropped signature
- a changed signer
- a changed artifact name
- a changed plugin type identifier
- a broadened capability set
- a first install with no verified signature
Re-call the install with acknowledgements bound to that exact release, and the server re-verifies hash and signature from scratch. An update that resolves an anomalous candidate parks rather than installing, so watch for parked updates. An unnoticed one freezes the plugin at its old version.
The order is fixed: hash verification, then signature, then acknowledgement. There are no blanket acknowledgements, and a routine update (same key, same names) costs no extra step. The check compares the identity of the signer, which is what a repository or publisher-account takeover changes. Signature bytes differ in every release and are not compared.
A plugin update that halts
An update's plugin roll reloads one replica at a time. It halts at a turn that fails, a turn that does not finish, or a fault at the new version reported by any live replica, including a replica that entered safe mode after boot failures.
While it is halted, no replica starts a turn, and the replicas the walk has not reached keep running the old version until they restart or something reloads the instance. The update cannot be abandoned. The version is already committed, so a replica that restarts loads the new version, and a restart does not clear the halt. Retry or Give up ends it.
The calls need integrations.manage and workloads.approve. The update's id comes from GET /api/workloads/updates?pluginInstanceId={instanceId}. The roll's settings (FleetSize, TurnBudgetSeconds, TurnDrainSeconds, NudgeRetrySeconds) are in configuration.
Reading where the walk stands
The System status Alerts tab shows the plugin.roll_incomplete alert (Plugin update incomplete) on the plugin instance for as long as the roll has not finished. Its message ends with the walk's detail:
| Detail | What it means | What to do |
|---|---|---|
{replica}'s turn, {age} |
A turn is running | Wait. A turn still running after TurnBudgetSeconds (300 s) halts the walk |
waiting for {replica} |
The replica was sent its turn and has not claimed it yet | Wait |
{replica} did not run its turn: {reason} |
The replica's reload answered that it could not run, for example an invalid manifest. It is sent the turn again NudgeRetrySeconds after each such answer |
Fix the reason, or Give up |
{replica} has not started its turn |
The replica has been sent turns for a turn budget without claiming one. It does not hear them, or an earlier hung turn still holds its install lock | Restart that replica, or Give up |
waiting for the fleet: {k} of {n} replicas live |
Fewer live replicas than FleetSize |
Let the missing pod come up, or Give up |
asking the fleet for fresh reports, waiting for fresh reports from {…} |
Every replica is at the new version and the roll is confirming it | Wait. A replica that never answers holds it here |
the live replicas run different host builds; waiting for the host rollout (…) |
A host rollout is in progress or stalled | Finish the rollout, or Give up |
the row belongs to update {id}: {why} |
Another update of the same plugin type still holds the roll | Let that update end |
this replica is stopping; the next leader carries on |
The leader is shutting down | Wait |
… could not be read: …, the pin could not be committed: …, the faults at {version} could not be written: … |
A read or write the walk needs failed. It retries on its next tick | Fix the named cause; for has no release with an artifact digest, sync the plugin repository so the release row returns |
halted: {replica} {reason}[; and n more faults at {version}]; halt {haltId} |
Halted | Retry or Give up |
GET /api/workloads/updates/{intentId}/roll returns the roll as the walk reads it:
- the current or last turn (
turnId,replicaId,outcome,outcomeReason,live,released) halted,haltId,haltedReplicaIdandhaltedReason- the
faultsthe halt covers, each withkey,replicaId,latestSequence,countandreason fenceBoundUtc, and who retried or gave up
It answers 404 for an unknown update, or when the plugin type's roll belongs to another update.
For a native plugin with workflow blocks, the outcomeReason of a turn whose activation succeeded ends with what that replica did with them: ; blocks swapped live, or ; blocks after restart: <reason> when a block changed shape or is no longer exported. A fallback alone does not fail the turn. An instance call that did not succeed, or that left an instance at another version, fails the turn, and its reason names that call. The replica's log then reads blocks not swapped: <reason>.
A pod stopped during its turn lets the turn finish for up to TurnDrainSeconds (10 s). A turn that releases in that time records its outcome, interrupted if the stop cut it short, and the walk carries on. A second interrupted turn in one update halts with two turns ended with their replica stopping, so two host rollouts inside one update's walk need one Retry.
Retry, once the cause is fixed
POST /api/workloads/updates/{intentId}/roll/retry
Content-Type: application/json
{ "haltId": "<the haltId from the alert or from GET …/roll>" }
Retry acknowledges the faults the halt lists and clears the halt, and the walk sends the next turn at once. It answers 409 with a reason when:
- The halt changed since it was read, because a fault was added or a later turn halted. The problem's
currentHaltIdis the halt shown. ReadGET …/rollagain, check the faults, and retry with that id. - The turn is unreleased: it is still running, or it did not finish and a fence it raised may still stand. The problem's
notBeforeUtcis the fence bound. For a turn that did not finish, retry after it. A turn still running moves it forward with each renewal, so wait for the turn to end. - The roll is not halted, the update was given up or has ended, or it is not at its plugin roll.
A halt from a turn that did not finish (did not finish its turn). Restart the named replica first, if it is still running. A hung turn holds that replica's install lock until its process ends. Without the restart, the retried turn does not start and the detail becomes "has not started its turn".
A fault that repeats. Retry means "the cause is fixed". An acknowledged fault that recurs with a higher sequence halts again, and the recovery sweep re-records a persisting one every 60 seconds. The fix hint then offers: fix it and retry, disable the failing plugin instance and retry, or Give up.
Give up, and fix forward
POST /api/workloads/updates/{intentId}/roll/give-up
Give up ends the update where it stands. It answers given up, unless the update completes first — see its status, because an update that completes before the walk's next call is not given up. It answers 409 while a turn is live or its fence may still stand (with notBeforeUtc), when the roll was already given up, after the update has ended, and when it is not at its plugin roll.
On its next call the roll clears its alert and fails with a reason of the form given up by {user id} at {time}: {where the walk stood}; pin: committed at {version} | pin: not committed: {error}; the fleet is mixed — …. The update ends RollbackFailed with nothing undone, and the Alerts tab shows workload.{id}.rollback_failed with that reason.
- Pin committed. The replicas the walk reached run the new version, and the others move to it within minutes. Each replica's plugin catch-up applies the pinned version once the update is no longer open, retrying at
Plugins:TypeCatchUpRetryDelayand doubling up toPlugins:TypeCatchUpRetryMaxDelay(15 s to 5 min), with no restart. - Pin not committed. The others keep the previous version.
To fix forward, start an update to another version. The given-up update is terminal, so a new one can start, and it walks the fleet from the start.
What Give up cannot reach
A re-published version. When the update's repository re-publishes the target version under the same number with a manifest this build refuses, the next sync rewrites its release row, and a leader that does not have that version on disk cannot plan the update. The roll's alert stops changing, Give up has no effect, and the leader logs Could not build the update plan for intent … ; staying in … to retry on each tick. Restore the version's manifest in the repository and sync it.
A deleted instance or source. The host refuses these while the update is active:
| Call | Refused while |
|---|---|
DELETE /api/plugins/instances/{id} |
the instance has an active update |
DELETE /api/plugins/repositories/{id} |
an active update's module loads from that repository |
DELETE /api/resource-indexes/{id} |
the index created a repository an active update's module loads from |
Each answers 409, naming the update. Let it complete, abandon it before its plugin roll, or give it up at its plugin roll, then delete. An instance delete that meets an update of its type being started answers 409 without an update, so try it again. An index sync that stops listing such a repository keeps it and logs that it is kept until the update ends. The first sync after the update ends deletes it.
Workload consent on upgrade
Whether an update escalates anything is computed on the server by comparing the recorded consented profile with one derived from the release manifest and the resubmitted parameters. It fails closed on a fresh install, a missing recorded profile, an added workload or any derivation error.
The profile has two axes:
| Axis | Covers | On growth |
|---|---|---|
| Security | Workload kind, network mode, privilege flags, capability set, resolved device, message-bus and host paths, and the digest of any raw patch | Parks and asks on any increase |
| Volumes | Volume sizes | Informational. Growth flows through auto-update with a note, which keeps the prompt rare enough that an operator reads the one that asks for host administration |
The image digest is not a consent axis. A new build of a privileged plugin's workload applies with no consent signal. It is visible afterwards in the informational note and the audit trail.
Consent a host upgrade needs again
A host release can change what an installed workload requires without any plugin update, for example when the workload provider starts to run a workload that binds a device as privileged. The recorded consent does not cover the new requirement, so consent enforcement suspends the workload when the upgraded host boots. It stays suspended, and nothing is lost: its volumes stay. The changelog names a release that does this.
To run it again:
- Open the plugin's page under Plugins, Marketplace. It shows a Workload consent needed notice for each installed plugin whose workloads are held this way.
- Choose Review and consent. The dialog lists what each held workload requires now and what the recorded consent does not cover.
- Choose Consent. This needs
workloads.approve. A widening code such asprivilegedalso needs thePrivilegedInstallswitch on (configuration). The consent is recorded, audited asplugin.workload_consent.renewed, and the workload resumes on the next reconcile. If what the workloads require changed after you opened the dialog, the consent is refused. Review it again.
When a workload's kind, network mode or unsupported pod patch changed, the dialog says so and offers no consent. Reinstall the plugin, which reviews and records the full consent.
The same is reachable over the API. GET api/workloads/consent/{pluginTypeId} lists the held workloads and the requirementsFingerprint of what consenting records. POST to the same route with that requirementsFingerprint in the body consents. Consenting widens the recorded consent only. It changes no grant, parameter or artifact.
Alerts raised by an upgrade
| Alert | Raised when | What to do |
|---|---|---|
cluster.start_refused |
A replica refused to start beside a build outside its window (exit 76) | Stop the roll and take the full stop |
plugin.roll_incomplete |
A plugin update's roll has not finished | Read the detail (a plugin update that halts) |
Rolling a release back
On Helm, deploy/scripts/rollback-helm.sh wraps helm rollback. Helm restores the chart and values stored with the target revision, so nothing is rendered from your checkout and no values file is passed. The script takes --revision N (a positive integer, required), --release (default reeve), --namespace (default default), --dry-run (the default) and --no-dry-run. Any other flag, a flag without a value or a revision that is not a positive integer exits 64. Both modes need a reachable cluster (KUBECONFIG or a current kubectl context).
- Read the release history (
helm history <release> --namespace <ns> --max 10) and pick the target revision, usually the previous one. - Run the script in its default dry-run posture. It prints the last ten revisions and runs
helm rollback --dry-run, which changes nothing:./deploy/scripts/rollback-helm.sh --release <release> --namespace <namespace> --revision <N>. - Re-run it with
--no-dry-run. - Probe
/health/liveand/health/ready. Both must answer healthy.
The script exits 0 on success, 64 on a usage error, 65 when helm or kubectl is missing, no cluster is reachable or the release history cannot be read (in both modes), and 67 when helm rollback fails. helm rollback runs no migration Job (the chart declares no pre-rollback hook), so a rollback changes the image and nothing in the database.
It does not revert the schema. There are no downgrade shims, and no Down migration runs. Tables a newer release added must be dropped, and columns it removed re-added, by hand before an older binary starts. The changelog gives the statements where a release needs them. Prefer a restore from backup over a hand-reversal (backup and restore).
It does not clean up workloads. The workloads the orchestrator manages keep running whatever the backend does, so a binary-only rollback leaves them in place. If you remove the orchestrator altogether, nothing reconciles or revokes them, no chart owns them, and they keep the host access they were granted. To clean up:
- Inventory them by the installation label, never by a reconstructed name.
- Delete the controllers, services and secrets while retaining the data volumes.
- Audit the nodes that ran privileged workloads.
Workload settings. They live in integration.workload_settings, and the pause lives in core.runtime_settings. They can also be declared as Managed:WorkloadProviders and Managed:WorkloadOrchestrator (workload settings (managed)). While either feature is managed (or held by its applied version after a refused hand-back), no workload settings write happens, the pause included. To go back to the rows, restart the replicas without the sections, which copies the active versions into the rows.
Changes that cost the operator something
| Change | Consequence |
|---|---|
| Changing the deployment domain | Every passkey must be re-enrolled. Credentials bind to the relying-party identifier at the authenticator |
| Swapping the Matter bridge to a production attestation identity | Every ecosystem must re-commission. Controllers pin a fabric's vendor identity |
| Losing the bridge's fabric volume | The same, and there is no other recovery path |
| Deleting a plugin instance | Every logical device whose sources all belong to that instance is hard-deleted, with its telemetry, state events, command logs, scene actions, cloud exposures and per-device overrides. A device with a second source only loses that source. This is the destructive plugin operation. Uninstalling the type is not |
| Removing the last instance of a plugin type | The recorded consent grant is dropped, so a re-install asks again. A hijacked plugin cannot reuse an old grant |
| Uninstalling a plugin type | Refused while any instance exists, naming them, and it cascades nothing an instance owns. It removes the installation record, the permission grant, the recorded consent, the on-disk artifact and the registry entry on every replica, so a re-install asks for consent again. Workflows that use a native plugin's blocks stop starting at once (refused with plugin-uninstalled: 403 on the library's execute endpoint, 409 on a debug-session start). The request waits up to 30 s (or Cluster:ActionTimeBudget when that is shorter) for their live runs and answers removed, or kept with the runs still going, whose blocks then stay until the restart. It answers none for a type without native blocks, and ended when a reinstall or a stop ends the wait first |
| Reloading a plugin | Every device it owns is offline from stop until restart. The confirmation lists them |
| Appending a capability-kind value | Values persist as numeric ordinals and are append-only. Inserting or reordering mis-decodes every stored capability descriptor and scene action |
| Changing a Switch gang's Matter export type | The gang changes Matter device type at the bridge. Google Home keeps the type it knows until the device is recreated (Expose off, Resync, Expose on, Resync, then set it up again, which loses its room, name and routines). See the Matter bridge |