Deployment & operations

Infrastructure job ledger and lifecycle records

Records every provider destroy, resize and inventory request as a durable job, and keeps planning state for storage growth, replica failover, resource health and spend budgets.

BetaEngine edition 5f8ea3af

What it does

Two route groups for platform administrators. /admin/v1/infra-ops runs destroy, resize and inventory jobs against the provider adapters and keeps them in a durable ledger that survives restarts. /admin/v1/infra-lifecycle stores autoscaling policies, failover state, health observations and budgets, and computes decisions from facts you supply. It does not resize disks, promote replicas or move traffic.

How it works

POST /admin/v1/infra-ops/jobs accepts an operation (destroy_compute, resize_compute or inventory), a provider and a resource reference, and answers 202 with the job. Before any network call the server checks the operation against the declared capabilities of the provider. An operation a provider cannot perform returns a typed unsupported answer, not a made-up success. The job then runs against the real adapter, and its outcome is written to the job with provider errors scrubbed and bounded. Deploying new compute is not part of the ledger: it reports deploy_compute as unsupported and points to the cluster route, so one code path creates compute.

Jobs can be listed, read, cancelled and retried. Each transition is a first-committer-wins transaction, so two concurrent changes to one job have one winner. At start-up, jobs found in a transient state are reclassified, so no job claims to be running after a restart. The group also serves capabilities for a provider kind, bounded metrics and telemetry, and an audit listing.

The lifecycle group keeps four kinds of record. An autoscale policy holds a utilisation threshold, a growth percentage, a minimum increment, a maximum and a cooldown, and evaluating it against measured used and total gigabytes returns noop, resize or refused using integer arithmetic. A failover record walks idle, fencing, promoting and promoted with a fence token, so one attempt can win per epoch, and refuses stale health, a live primary and a second attempt. A health observation is classified as healthy, degraded, unhealthy, stale or unknown. A budget records spend, and unknown spend is not treated as zero.

All routes require platform administrator authority, and a fenced engine answers with the typed 503 before any work starts.

Where you reach it

  • HTTPPOST|GET /admin/v1/infra-ops/jobs, GET /admin/v1/infra-ops/jobs/:id, POST /admin/v1/infra-ops/jobs/:id/cancel, POST /admin/v1/infra-ops/jobs/:id/retry
  • HTTPGET /admin/v1/infra-ops/capabilities/:provider_kind, /metrics, /telemetry, /audit
  • HTTPPUT|GET /admin/v1/infra-lifecycle/autoscale/policies/:id, POST .../evaluate
  • HTTPPUT|GET /admin/v1/infra-lifecycle/failover/:id, POST .../fence, .../promote, .../complete
  • HTTPPUT|GET /admin/v1/infra-lifecycle/health/:ref_hash, PUT|GET .../budgets/:id, POST .../budgets/:id/spend
  • CLIkynetra infra [--json] <subcommand> (needs --remote; reads capabilities, jobs and metrics)

Limits

  • The job ledger inherits the provider limits: some adapters have request-level tests and others have none, and none attaches persistent storage.
  • Storage autoscaling returns a decision and does not act on it. Applying a resize is refused, and the answer says that storage expansion fails closed until a provider adapter supports changing disk capacity.
  • The failover records are planning state. They do not stop a primary, promote a replica or reroute traffic, and the facts they use are supplied by the caller.
  • Metrics are bounded: usage records are kept in a fixed-size ring, and provider billing is reported as unknown unless a measured cost source exists.
  • The routes need platform administrator authority. A project-scoped token is refused.

Evidence

  • On this siteAPI reference: admin route groups
  • TestsCovered in the engine repository by 21 infra-ops tests (including a race test where two concurrent transitions have one winner and restart recovery of transient jobs), 15 lifecycle tests and mounted-router tests for the production router

Test coverage is listed as present in the engine repository at this edition. This page does not report test results.

KynetraDB is in private preview

Request a preview to talk through the limits above against your own workload.