Reeve Docs

Docs / Reference

Workloads

Workloads are plugin-owned deployments reconciled by Kubernetes, Docker or Manual providers. Reeve stores password parameters in protected form and accepts opaque provider references in place of literals. The host resolves references through the same provider registry and cache used by plugin secrets. A missing provider, forbidden path, missing secret or provider outage blocks deployment; no empty parameter is passed to a workload.

A stored password literal can be moved to an equal provider reference from Secrets → Stored secrets. The host resolves the candidate freshly and replaces the old literal only if it is unchanged, so a concurrent edit is reported without replacing the value. The move keeps the applied specification hash and does not trigger a reconcile. It is audited as workload.password_reference_rebound against the workload and as secrets.bind against the owning plugin instance. The audit rows are written after the change is saved, so a process failure in between can leave the move complete without one or both rows.

A version in the reference pins the provider value. Workload password controls pin by default when the provider supports versions. This matters for network keys: changing a key can orphan secure Z-Wave nodes.

The host's Tls__TrustedCaCertificates is a PEM bundle of additional CA roots, validated and normalized at startup (maximum 64 KiB). The host trusts it for its own outbound TLS as well. A workload receives it only when its manifest declares REEVE_TRUSTED_CA_CERTIFICATES from bootstrap:trustedCaCertificates. Without that declaration the workload gets no such environment variable, and an empty or unset setting supplies no extra roots.

The value is an environment variable outside the specification hash, so changing the list never rolls a workload out. Restart the host, then redeploy each workload that should see the new list. With the Manual provider, render the artifacts again and deploy them. A workload applied for any other reason in the meantime picks up the host's current value.

An unpinned password reference follows provider rotation in the cache, but refresh alone does not change a running workload. GET /api/workloads/{id}/references/pending exposes only parameter names, opaque references and rollout states for that instance. AwaitingApproval prompts “A secret changed in the provider — redeploy”; ApprovalStateUnavailable offers approval to recover the unreadable saved approval state; ResolutionFailed asks the operator to fix the provider and offers no approval action. POST /api/workloads/{id}/references/approve approves the current value and starts the normal rollout. This is an explicit redeploy because a new network key can orphan secure nodes. The pending read and approval use the workload instance viewing and parameter-edit permissions.

Stored password values are encrypted with the host's Data Protection key ring, so keep a backup of the key ring together with every database backup. See upgrading and backup and restore.

Docker runs on one backend

The Docker provider acts on the one daemon its backend reaches and has no identity for that daemon, so it is supported on a single backend instance only. A clustered host (Coordination:Clustered=true) does not register Docker's auto-detect probe, so Automatic resolves to Kubernetes in a cluster and to Manual elsewhere, identically on every replica. A save that selects Docker answers 400. At boot, before the engine starts, the host reads the stored provider and the workload rows and exits with code 75 when the selection is Docker or a row bound to Docker is not frozen. Frozen rows belong to the operator's runtime and do not count: rows that are externally managed after the operator's switch to Manual, or held by the host while externally managed. A row in the middle of a switch does count. A single backend is unaffected.

Cross-replica command rows

A command for a workload session held by another replica is written to integration.workload_commands, and the owning replica is notified. The payload and response can carry secrets (a Matter setup code, a Thread dataset), so both are encrypted with Data Protection on the key ring every replica shares. The payload is cleared when the owner claims the row for delivery or the row ends in any other state, and the response is cleared once the waiting caller has it. The retention sweep deletes a finished row Workloads:Gateway:CompletedCommandRetentionHours (default 24) after its outcome, and a Pending or Delivered row the same time after its creation, so a row abandoned by a cancelled caller or a lost session does not stay. A row's payload is never logged.

Enabled state and the host hold

A plugin instance's workloads run only while the instance is enabled and recorded consent still covers them. Each workload has one host hold, and Reeve decides both reasons together: a disabled instance is held, enabling it lifts the hold only when consent also allows, and restoring consent never starts a disabled instance. The workloads of a disabled instance are created already held. A periodic reconcile pass that lands between the write and the hold can still deploy a row briefly, and the hold then stops it. Enabling starts the plugin, tells the other replicas, and only then releases the workloads, so the adapter finds a running instance. A start that failed releases nothing. Disabling holds the workloads first. The start, stop, hold and replica notice do not depend on the request's cancellation, so a disconnect cannot leave an enable or disable half applied. Boot and consent enforcement apply the same rule.

A hold replaces an operator's pause, so a pause does not survive disabling and re-enabling an instance, nor a consent hold that is applied and then released: enabling means "run it".

When the deployment declares the orchestrator settings (workload settings (managed)), the declaration is the consent to those settings and nothing more. Consent for a workload is still recorded in the panel, and an activation that widens a workload's spec suspends that workload until it is consented. During a pending provider switch, installs and updates of plugins that declare workloads, restores from a retained volume and adoption answer 409 provider_switch_pending, and the materialisation of consent waits.

Stranded workloads

The orchestrator settings page (the orchestrator settings) lists containers that outlived their workload rows. The check reads the Docker daemon socket, so it exists only for the Docker provider. For any other provider the card is not shown and no request is sent. On Docker, GET /api/workloads/orphans answers 503 and logs a warning when the daemon cannot be inspected, and the card says it could not inspect the runtime. Any other failure is shown as a plain load error.

Default StorageClass

The Kubernetes provider's default StorageClass is set in the workload settings (Workload orchestrator → Kubernetes), which are the only place it is read from. A deployment can supply a starting value with the Helm value workloads.defaultStorageClassName (environment variable Workloads__DefaultStorageClassName). A startup job writes it only while no workload settings have been saved. Once the settings exist, whether saved by that job or by an operator, the configured value is never applied again, so a class set or emptied on the page stays as it is.

Demo content preflight

Demo content installs the virtual-devices plugin and waits on its simulator workload, so before it creates the plugin instance it runs the workload install preview for that release with the effective provider. These findings block it:

  • any failing check at error severity;
  • a StorageClass the cluster does not have, a failing storageclass-missing finding whatever its wording. The provider reports it as a warning, but a PVC that can never bind leaves the simulator, and the demo, waiting forever. storageclass-topology never blocks: it grades only classes that exist, and its topology-bound warning (local-path) is the single-node default;
  • a class list Reeve cannot read (the chart's default namespaced Role, both checks inconclusive) while no default StorageClass is set in the settings. A class an operator set there is trusted;
  • a workload graded under storageclass-topology with no storageclass-missing verdict, while no default StorageClass is set: whether its class exists went unanswered, so the preflight fails closed.

The blocker is the provider's message and fix snippet, shown in the onboarding wizard (GET /api/users/me/onboarding/demo-preflight, home.manage, answered within 30 s or 504) and as the failed run's reason. When the plugin instance already exists, readiness is its workloads' health, not the instance's existence; an instance with no workload yet (they materialize after its commit) is not ready. A person without home.manage gets 403, and the wizard then does not offer demo content and says why.

A demo run can be resumed at any step. A plugin that is installed without an instance (a run interrupted between install and create) only gets its instance created and is not installed again. When that create fails because this replica refused the installed artifact or has not loaded the plugin, the run names the refusal or asks for a restart, as an install does. The run waits up to 3 minutes for the instance's workloads before it calls the simulator, so a resumed run never calls a simulator that is still starting, and one that never comes up fails with the workload's own state. The simulator call has a 15-second timeout, so a simulator the backend cannot reach (for example behind a network policy that drops the traffic) fails the run with that reason instead of hanging it.

The simulator is addressed by VIRTUAL_DEVICES_BASE_URL when that environment variable is set, otherwise by the resource name its provider gave the workload, on port 5179. That name resolves for the Docker provider on a single backend and for the Kubernetes provider in the backend's own namespace; under the Manual provider the operator sets the variable (configuration).

Gateway diagnostics

The gateway keeps one row per instance with the last connection attempt and the last disconnect, which the Gateway box on System status and the gateway-status endpoint read. A handshake failure counts and is listed only while its last attempt is inside Workloads:Gateway:RecentHandshakeFailureWindowHours (24 h by default); an older failure is neither counted nor listed, though its row still counts among the instances with diagnostics.

A row belongs to an instance that exists: a workload instance, or the Matter bridge, which opens a gateway session without being a workload. Rows of any other id are left out of the read, so a removed workload shows nothing. If the instance lookup fails, every row is shown. A row is recorded for an existing instance, and also for any outcome after the connection token has resolved and bound to the route id, since the token proves the instance exists. A new workload's first failure and first live session are therefore recorded at once. A dial that fails earlier, naming any other id, leaves no row and is reported in a log line at most once a minute.

Those dials are checked against a snapshot of the known ids that is kept for 60 seconds. A miss re-reads the list at most every 5 seconds per replica, whether or not the read succeeded. A second caller does not wait for a read already in flight, and a read gives up after 3 seconds. A failing lookup is logged at most once a minute.

The replica-status-alert job deletes, once an hour, rows of other ids that were last touched more than five minutes ago. The box shows the bridge as "Matter bridge".