Skip to content

The ledger ​

Each run is one SiteFailover object, its ledger, at the new primary's site. The ledger holds the whole plan, and the result of every step. A run resumes from its ledger, never from memory.

APIfailover.tako.id/v1. v1alpha1, the API of v0.1.x, is still served, deprecated, with the same schema.
KindSiteFailover, namespaced, short name sfo
Wherethe new primary's site, in the Workload file's spec.ledger.namespace, tack-system by default
Name<workload>-<UTC yyyymmdd-hhmmss>, from the plan's time, with -2 to -9 appended when the name is taken
Labelfailover.tako.id/workload: <workload>
specthe mode, from and to, a snapshot of the Workload file, every step, and the cluster of each site that answered the plan. Written at creation, and never changed after.
statusthe run's state and reason, each phase and step with its times and earlier attempts, captured values such as the demotion token, held objects, Git revisions, follow-ups, the fork point after a site loss, when writes stopped and came back, and the run's history
The CRDfailover.tako.id_sitefailovers.yaml, in each release and in the chart: Install

RFC#0003 lists every field of spec and status.

Reading it ​

tack status RUN -f workload.yaml shows a run step by step, and -o yaml or -o json prints the object (Reading a run). With kubectl:

sh
kubectl --context site-b -n tack-system get sfo
ColumnFrom
Workloadspec.workload.name
Modespec.mode
From, Tospec.from, spec.to
Statestatus.state: Running, Waiting, Stopped or Succeeded
Reasonstatus.reason: why a run stopped or waits (Stopped and waiting runs)
Abandonedstatus.abandoned.at, when tack abandon marked the run (Abandon a run)
Phasestatus.phase
Agemetadata.creationTimestamp
TakenOverBystatus.supersededBy: the run that took this one over

Keeping it ​

Writing a ledger is privileged, because tack resume acts on what a ledger holds: check who may write ledgers. tack prune deletes the ledgers of old runs that succeeded (Old ledgers). A CRD older than the CLI drops the fields it does not know, so upgrade the CRD first.

Released under the Apache License 2.0.