Sizing, availability and recovery¶
This page covers how big to make the syncd host or pod, what high availability syncd supports (one engine, or from 0.4.0 an active/passive pair), how to back it up off the host and recover it after losing the host or the cluster's volume, and how to go back to the previous release. The backup commands themselves are in the Operator guide. For the suite-wide picture, see Sizing, availability and recovery.
It describes syncd 0.6.1 (tag v0.6.1, commit 59cbf19). For this page, 0.5.5 changes how an
HA pair fences its writes and what a takeover means for Debezium sources
(High availability), makes the engine's startup budget a Helm value and
documents growing its volume (Sizing on Kubernetes), and changes the
console's schema (30 to 33), which a rollback to 0.5.4 restores
(Rolling back an upgrade). 0.6.0 adds the dsml connector, whose
sequence number and waiting exports are kept in the store; 0.6.1 changes only the host installer.
Neither changes the store's format or the console's schema.
Sizing¶
Measured by the project's own benchmarks
Unlike the other ENS applications, syncd's figures below are measurements: its benchmark
suite (docs/phase1/BENCHMARKS.md in the source repository) runs on a 4 vCPU VM, with every
person present in two sources (an HR table and a directory). They are not load tests of your
sources and targets: the speed of an LDAP target or a source database usually sets the pace of
exports and reads. The 0.4.0 features (held changes, report mode, timers, snapshots) were not
re-measured: their costs below come from how the code keeps them. The 0.5.0 figures (source
lag during long operations, held changes, incremental snapshots) were measured with debug
builds on a shared 4 vCPU VM, at 100,000 people or fewer; nothing of 0.5.0 was measured on
the reference node, at a million people or in a release build. The store's migration to
format 2, which 0.5.0 runs at its first start, took 1.4 s for 300,000 entities with one record
each (release build, 4 vCPU); entities with many attributes take longer. 0.5.1 measured
nothing new; the extra work of its first full sync (claiming unique() values) was not
measured. 0.5.2 measured its faster joins in release builds on 4 vCPU, at 200,000 people and
some at 1,000,000 (see Joins and first reads); 0.5.4, 0.5.5, 0.6.0
and 0.6.1 measured nothing new. Start with these figures, watch the signals named here, and
adjust.
What drives the size¶
| Driver | How the code handles it | Settings |
|---|---|---|
| Entities and source records | Each entity and source record is held in the engine's in-memory hash and link index and its join index. Memory grows with them: about 1.2 GiB per million entities with two source records each | |
| The first full load | Builds the indexes and writes every entity: about twice the steady memory while it runs | |
| Store block cache | Caches the store's decompressed blocks. It matters little while the operating system's page cache holds the store, so leave RAM free for that rather than raising it | engine.cache_mb (256; at most 32 768; takes effect when syncd restarts) |
| Store write buffers | Up to 256 MiB in all, whatever the number of views and publications. Flushed to disk as they fill, and on a clean stop | |
| Entity history | An entry per change, a few hundred bytes each: a full load writes one per entity, and a stream of changes one per changed entity. From 0.4.0 each entity keeps a floor of entries past the age cut (see Entity history) | engine.history.keep_days (30; 0 records none), keep_per_entity (100), min_per_entity (10) |
| Held changes | One entry in the store per held entity and publication, replaced as the plan changes. From 0.5.0 they are kept in the store and only counted in memory: 40 MiB less at 475,000 held changes, with passes over such a publication 18 to 35 % slower (debug build). A change window that holds a day's changes, or a threshold that holds a mass change, holds one per changed entity | Change windows, thresholds, canaries (see Change safety and lifecycle) |
| Report mode | Every change a publication in report mode would make is held as a would-do, in the store and in memory, as above. A report-mode publication over a view not yet in its target holds one per entity in scope: allow memory in proportion for a very large view | mode: report |
| Persisted timers | In the store, keyed by due time: one per entity with an effective date or a leaver stage ahead, and a few per publication. Their count is kept in memory, not the timers | |
| Data-quality failures | Per failing entity, the checks it fails with their messages, in memory and in the store | A view's quality checks |
| Publishing a configuration | Recomputes every entity a page at a time: a few hundred MiB more, not a copy of every entity | |
| Simulations | Run beside the engine on a copy of its store (hard links), with their own indexes and write buffers. Allow about 0.7 GiB per million entities, and about half the store's size on disk, while one runs. One runs at a time | |
| Backups | A store checkpoint (hard links, little disk) under the data directory while the archive is streamed; no temporary copy of the archive. CPU for the zstd compression | engine.backup.every_secs |
| HA snapshots | From 0.5.0 a snapshot is a store checkpoint with a manifest of its files (sizes and SHA-256). The active engine keeps the newest two under <data_dir>/ha/snapshots/ as hard links to the store's files, so they take the space of the files the store has replaced since. The passive engine keeps the newest one it received, a full store beside its own. The first is sent whole; after it, only the files the passive engine lacks (11 KB instead of 431 KB in the end-to-end test at 3,000 people). Larger stores were not measured |
engine.ha.snapshot_every_secs (60; 300 before 0.5.0) |
| HA password queue | From 0.5.0 the passive engine keeps a copy of the active one's password queue in <data_dir>/ha/password-queue.replica, sealed as in the store |
engine.ha.password_replication_wait_ms (2000) |
| Unmanaged entries | From 0.5.0, after each scheduled drift check, a read-only paged search of the target for entries no publication exported, and of its privileged groups; the result is kept in the store. Not measured | A publication's unmanaged (scheduled: false turns it off) |
| Custom functions in WebAssembly | From 0.5.0, an interpreter (wasmi) runs a package's module: about 5.4 µs a call (release build). Each call is limited in fuel and each instance in memory | engine.wasm_functions: fuel (10,000,000), memory_mb (16) |
| The queue between sources and the engine | Up to 10 000 changes, each a whole record. A few tens of MiB for people; much more for sources that send large groups (thousands of members per entry) while the engine is busy | |
| Large deletes, dead letters, groups, renames | Read a page at a time: about 20 MiB for a full read that finds 400 000 records gone, a few MiB for 400 000 dead letters, a group of 400 000 members, or 800 000 references to a renamed entity | |
| CPU | Recompute and export planning run on every core, and from 0.5.2 the recompute of the entities a source's first read joins or projects too; matching records to entities, applying the results and commits run on one | engine.shards (0: one per core) |
Starting figures¶
| Entities | Engine memory (steady) | Engine memory (initial load peak) | Store on disk |
|---|---|---|---|
| 1 million | about 1.1 GiB | about 2.3 GiB | about 0.25 GB, plus history |
| 3 million | about 3.4 GiB | about 6 GiB | about 0.8 GB, plus history |
Add, on the same host if they run there: the console (a small Rust server), PostgreSQL for the
console, nginx, and the JDBC bridge's JVM. Disk for /var/lib/syncd/backups must hold copies of
the engine store and the console's files: an upgrade refuses to start without room for one, and
the newest three are kept. An engine of an HA pair needs room for snapshots beside its store: on
the active one, the files the store replaced since the older of its two snapshots; on the passive
one, a whole store.
How long the long operations take, at a million entities on 4 vCPU (they grow linearly with the store):
| Operation | Time |
|---|---|
| Full sync (recompute every entity) | about 9 s |
| Reconciliation | about 6 s |
| Reload that changed every entity (publishing a configuration) | about 2 minutes |
| Restart (rebuilding the indexes, in parallel) | about 20 s for 3 million entities |
| Streaming a change end to end | about 22 000 changes/s, p99 about 0.1 s, in the benchmark harness |
These times were measured with releases before 0.5.0; at 100,000 people with debug builds, 0.5.0 changed them little (a reconciliation 3.6 s before, 3.9 s after; a reload 27.4 s and 27.5 s).
While a full sync, reconciliation or reload runs, commands are refused. From 0.5.0 source changes no longer wait for it to end: the engine takes them between the operation's pages. During a reconciliation they are exported at once; while a full sync recomputes, they are committed, and the reconciliation that follows exports them. Measured with debug builds on a shared 4 vCPU VM at 100,000 people:
| Measurement | 0.4.1 | 0.5.0 |
|---|---|---|
| A change during back-to-back reconciliations, from the commit in PostgreSQL to the write in OpenLDAP | p50 2,393 ms, p99 4,963 ms | p50 20 ms, p99 56 ms |
| Source lag during a reload that changes every entity | 27.4 s (the reload's length) | p50 492 ms, p99 666 ms |
Still waiting for the operation to end (they aren't lost): a full read's deletes, the first export
after an initial load, drift checks, the release of held changes, syncd approve's
reconciliation, dead-letter retries and write-back, and the end-of-pass pages for thresholds and
canaries. The figures at a million people on the reference node have not been measured.
Joins and first reads¶
New in 0.5.2. A source's first full read (or the first after a view is added) matches each record
against the view's join index one at a time, on one core, and recomputes the entities it joins or
projects in batches, on every core (engine.shards). A record waits for the batch's recomputes,
and is matched alone, when they could change what it finds: a key it joins by arrives with them, it
joins by a computed attribute, or one of its candidates is among them. The result is the same as
one record at a time, which a property test checks. A transaction writes each entity once, at its
commit (a join and the recompute after it wrote it twice).
Measured on 4 vCPU at 200,000 people, before and after the change that brought each gain, with
release builds (docs/phase1/BENCHMARKS.md, "Several joining sources"):
| Measurement | Before | After |
|---|---|---|
| Initial load of the HR source (projecting) | 52,100 records/s | 61,600 records/s |
| Initial load of the directory (joining) | 41,600 records/s | 47,600 records/s |
| A join rule with a condition many people share (department and employee id) | 561 records/s | 51,200 records/s |
| A full read, with nothing changed, of 200,000 accounts that join by surname alone and wait for review | 17.2 s | 0.21 s |
| A directory that brings the mail address another source joins by | 53,400 records/s | 59,900 records/s |
| Reopening a store of 1,000,000 people (the join index rebuilt at start) | 1.64-1.70 s | 1.34-1.41 s |
- A join rule starts from its rarest condition and checks the others for those candidates only, so a condition many entities share (a department) costs no more than the rarest one.
- A record waiting for review is evaluated again at a full read only when the entities its keys find, or its source's joins, changed.
- A joined record is checked against its entity again only when its join rules read an attribute that changed.
- The join index keeps short keys (up to 24 bytes) and single entities inline: smaller, and rebuilt faster at start.
- The later joins and the larger store gain most: a third source joining by employee id gained 21% at 200,000 people and 32% at 1,000,000. A projection with almost nothing to recompute gains little, and can pay a few percent for the batch's bookkeeping.
- What stays serial is matching each record (reading its candidate, 1.5-3 µs a record at 200,000), applying the recompute results, and the store's commit: about a quarter of a load.
On 4 vCPU a joining source loads at about 50,000-75,000 records a second, and one whose records each find a few dozen people (accounts joining by surname alone) at about 12,000. If a first read is much slower, see The engine at work in Troubleshooting.
Rules that read other entities. From 0.5.4, when only the key a rule found another entity by
changes (a group's member, for a rule computing each person's groups), only the entities of the
values gained or lost are evaluated again: one person added to a group of 10,000 evaluates that
person's rules, where 0.5.2 and older evaluated the rules of all 10,000 members. The groups are
also read for such a rule without their member lists. See
Computing memberOf from groups.
Known limitation. In one batch of changes, a record that moves because its own join keys changed, and records that move because their entity's join attribute changed, are checked in another order than one change at a time would check them: when both find the same entity, they can end differently placed. This needs keys that change in the same batch, and was so in 0.5.1.
Entity history¶
Entity history is usually the largest part of the store. The engine prunes it an hour after it
starts and every hour after that (syncd history prune --now does it at once):
- entries older than
keep_daysgo, except the newestmin_per_entityof each entity, so an entity's story is never empty; - then each entity keeps at most its newest
keep_per_entity; - an entity with an open held change or a dead letter keeps every entry, past both, until it
clears. Before 0.4.1,
keep_per_entityapplied to those entities too.
engine:
history:
keep_days: 30 # entries older than this are pruned; 0 records no history
keep_per_entity: 100 # at most this many per entity, the newest
min_per_entity: 10 # new in 0.4.0: the newest ones an entity keeps past the age cut
So the history holds at most entities × keep_per_entity entries, plus the whole history of
entities with a held change or a dead letter, and in a quiet directory about
entities × min_per_entity. Each entry is a few hundred bytes (the attributes that changed,
before and after; an export's operations). For a million people at 300 bytes an entry, that is
between 3 GB (the floor) and 30 GB (the cap, reached only with a hundred changes per person inside
keep_days).
Upgrading from 0.3.0
Before 0.4.0 there was no floor: a person with no change for keep_days had no history left.
The first prune after the upgrade keeps up to min_per_entity entries for every entity, so
the store does not shrink as it did, and an entity with a held change or a dead letter keeps
its whole history until that clears. Lower min_per_entity if the disk is tight.
What is kept shows in syncd status (history: N entries, oldest ..., pruned ...), the
console's engine page, and the metrics syncd_history_entries, syncd_history_pruned_total,
syncd_history_oldest_timestamp_seconds and syncd_history_last_prune_timestamp_seconds. See
also History retention.
The memory limit¶
The syncd service may use 80% of the host's memory (MemoryMax=80% in its unit). Past that the
kernel stops syncd, and systemd starts it again from its last commit, rather than the whole host
stalling for memory. Cloud instances usually have no swap, so without a limit that stall can take
the host down. To change the limit, run systemctl edit syncd and set MemoryMax= under
[Service]. Don't remove it.
How to check and adjust:
- Memory.
process_resident_memory_bytesagainstsyncd_memory_limit_bytes; the shipped alertSyncdMemoryNearLimitfires above 90% for 10 minutes. Memory freed after a simulation is not all returned to the system.syncd statusprints memory with its peak since the start, which shows how close the first load came to the limit. - Held changes and report mode.
syncd_held_changesandsyncd_shadow_plannedcount what is held per publication. A very large count costs memory in proportion: switch a report-mode publication toapply, or approve or fix what is held. - CPU.
rate(process_cpu_seconds_total[5m])is the CPUs the engine uses. The console shows it live on the engines dashboard and the live metrics page, as a share of the CPUs the engine may use (its CPU affinity, capped byCPUQuotaor a container's CPU limit); threads and open files areprocess_threadsandprocess_open_fds. A full sync uses every core for its recompute; a CPU limit lengthens it. - Disk. The size of
/var/lib/syncd/engineas entities and history grow; lowerengine.history.keep_daysormin_per_entityif history dominates. - Long operations.
syncd_engine_busy_seconds;SyncdEngineBusyfires after an hour. - Sources keeping up.
SyncdSourceStalled, and for PostgreSQL sources the replication slot's retained WAL (pg_replication_slots), so the database's disk doesn't fill.
Sizing on Kubernetes¶
The Helm chart gives the engine's pod:
| Value | Default | Size it as |
|---|---|---|
engine.resources.limits.memory |
4Gi |
The memory limit above: at least the initial-load peak, about 2.3 GiB per million entities, plus room for simulations. 4Gi covers about 1.5 million entities |
engine.resources.requests |
250m CPU, 512Mi |
Raise the memory request towards the steady figure, so the scheduler places the pod where that memory is |
engine.persistence.size |
10Gi |
The store and its history; the volume also holds the configuration file. Allow about half the store's size again for a simulation's copy. For a pair, each engine has a volume of this size, and needs room for snapshots as well: about the store's size again on the passive one |
engine.startupProbe |
periodSeconds: 5, failureThreshold: 120 |
New in chart 0.5.5: how long the engine may take to start (10 minutes by default) before Kubernetes restarts it. The control API listens once the store is open, and after a release that changes the store's format, once it is migrated: raise failureThreshold for such an upgrade of a large store |
engine.minReadySeconds |
0 |
New in chart 0.5.5: how long a new engine pod must stay ready before it counts as available. A rollout of a pair moves on to the other pod only then |
console.resources |
100m CPU, 128Mi requested; 512Mi limit |
Enough for the console alone |
The memory limit acts as MemoryMax does on a host: past it the kernel stops the engine, and
Kubernetes restarts the pod from its last commit. The engine reports the limit as
syncd_memory_limit_bytes.
Growing the engine's volume¶
engine.persistence.size is the size of the claim the StatefulSet makes for each engine
(data-syncd-engine-0, and data-syncd-engine-1 with engine.ha). Kubernetes does not let a
StatefulSet's volume claims change, so helm upgrade with another size is refused (updates to
statefulset spec for fields other than ... are forbidden). With a storage class that allows
expansion (kubectl get storageclass <class> -o jsonpath='{.allowVolumeExpansion}' prints
true):
-
Grow each claim:
kubectl patch pvc -n syncd data-syncd-engine-0 -p '{"spec":{"resources":{"requests":{"storage":"50Gi"}}}}'(and
data-syncd-engine-1for a pair).kubectl get pvc -n syncdshows the new capacity once the volume and its file system have grown; some drivers grow the file system only when the pod starts again (kubectl delete pod -n syncd syncd-engine-0). -
Make the chart say the same, for the claims it makes later: delete the StatefulSet but not its pods, and upgrade with the new size, which makes it again and adopts them:
Without volume expansion, the store moves to a new volume through a backup: back the engine up,
delete the StatefulSet and the engine's claims, run helm upgrade with the new size, scale the
engine to zero at once (kubectl scale statefulset -n syncd syncd-engine --replicas=0), restore
the backup into the new volume as Backups on Kubernetes says, and scale
it up again. The source repository's KUBERNETES.md documents this from 0.5.5.
High availability¶
syncd runs as one engine, on one host or in one pod, or from 0.4.0 as an active/passive pair of two engines. There is no clustering beyond the pair: never run two engines against the same sources and targets except as a pair, since each keeps its own store and both would export.
The active/passive pair¶
Two engines with the same configuration share a lease. The one that holds it is the active engine: it runs the sources and the exports. The other is passive:
- it serves its control API and its metrics, and its status says who is active;
- it runs no source and writes nothing to any target;
- it keeps a warm copy of the store: every
snapshot_every_secs(60 from 0.5.0; 300 before) the active engine takes a consistent checkpoint of its store, with its key material and configuration file, and the passive engine pulls it over the control API (mutual TLS). From 0.5.0 only the files it does not hold yet are sent, after the first; - from 0.5.0 it follows the active engine's password queue write by write between snapshots, and answers on the password ingest port, handing every call to the active engine;
- when the active engine stops renewing the lease, the lease expires after
ttl_secs(15) and the passive engine takes over.
| Lease backend | Where | Expiry judged by | For |
|---|---|---|---|
postgres |
A row per pair in the table syncd_lease, taken and renewed in one statement that succeeds only for its holder or over an expired row. The console's database works (its migrations create the table); in another, the engine creates it if its role may |
The database's clock | Production, on hosts and on Kubernetes |
file |
A file on a file system both hosts share, locked while it is read and written | The hosts' clocks: keep them in NTP sync | Tests and simple setups |
kubernetes (new in 0.5.0) |
A coordination.k8s.io/v1 Lease object, written with the resourceVersion it read, so the API server refuses the second of two writes |
Each engine's own clock: an engine takes the lease once the object has stood unchanged for its whole duration as it saw it, so the nodes' clocks need not agree. From 0.5.1 a clock NTP cannot step | Pairs on Kubernetes, so that they depend on nothing but the cluster's API. Tested in kind (the release's CI), not on a cloud cluster |
- TTL.
engine.ha.lease.ttl_secs, 15 by default, at least 3. The holder renews every third of it. A failover takes at most the TTL, plus the new engine's reconciliation. An engine that starts to a free lease waits a third of the TTL before taking it, so a lone engine becomes active 5 seconds after it starts with the default. A shorter TTL fails over sooner but makes a short database or network blip enough to step the active engine down. - Snapshots.
engine.ha.snapshot_every_secs, 60 by default from 0.5.0 (300 before; a value that is set is kept), at least 10. The interval is the failover window (below): shorter means less to catch up after a takeover, and more flushes of the store. From 0.5.0 a snapshot costs what changed rather than the whole store, which is why the default came down. A snapshot that could not be received whole changes nothing: the passive engine keeps the one before. - Password changes. From 0.5.0 a capture agent or a person changing their own password is
answered once the passive engine has the change, or after
password_replication_wait_ms(2000) when it does not answer; the change is accepted either way, counted insyncd_ha_password_changes_unreplicated_totalwhen it has no second copy. - A standby.
role: passivemakes an engine that never takes the lease and only follows. - Fencing. Every export batch (from 0.5.1, again before every 64 exports) and every password delivery checks first that this engine holds the lease and that it is not within a second of expiring, measured from 0.5.1 on a clock NTP cannot step. An engine cut off from the lease stops writing before the other may take over, and steps down to passive when it finds the lease gone. From 0.5.5 a chunk of exports still being written when the lease reaches that margin is abandoned, not written on beside the engine taking over (a write the target had already taken stays, and the takeover's reconciliation finds it), and writing back a target's changes after an outage checks the fence before each write. A Kubernetes lease's version is stamped when the API server's answer arrives.
- Member names. Each engine needs its own (
engine.ha.memberorSYNCD_HA_MEMBER, the host name by default). From 0.5.1 two engines with the same name no longer both hold the lease: the second waits, withLEASE ERRORin its status.
Setup: on hosts, An active/passive pair on hosts; on Kubernetes, An active/passive pair. Day-to-day running: High availability in the Operator guide.
What happens on failover¶
- The active engine stops renewing: it died, its host or its network went away, or it was cut off
from the lease's database. A clean stop (
systemctl stop, a pod deleted by a rollout or a drain) gives the lease up at once instead, and the passive engine takes it at its next try, within a third of the TTL; the stopped engine, restarted, waits that long before it would take a free lease, so it does not take it back. - The lease expires after
ttl_secs, and the passive engine takes it (this engine took the lease; taking over). The console sendsha.failover. - It swaps the newest snapshot it received in for its own store, in steps a crash can interrupt and the next start finishes or undoes. From 0.5.0 it then applies the password queue it followed since that snapshot, before it delivers anything.
- It reconciles every publication with its target, then starts the sources from the checkpoints in the snapshot (for a source whose first read is a full one, the reconciliation follows that read). From 0.5.1 this happens after a promotion or a restart only, not again at a reload. If the store cannot be released for the swap within 30 seconds, the engine exits, and its restart swaps the snapshot in.
- The old engine, when it comes back, finds the lease held and starts passive. From 0.5.1 an engine that crashed while active and restarts at once waits for its own lease to expire before it competes again.
The failover window. Changes the old active engine exported after its last snapshot are found again:
- the sources resume from the snapshot's checkpoints and read again what came since: a syncrepl cookie, a change-log number, a binlog position, a resume token, a CSV file;
- a PostgreSQL logical replication stream cannot go back past what its slot confirmed, so after a takeover it reads its tables in full first (the slot stays; unchanged rows cost nothing);
- Debezium sources are the exception: Debezium keeps its own position and moves on once an
engine answered, so what the old engine took in after its last snapshot is not sent again.
After a takeover, have Debezium send the tables again with an incremental snapshot (an
execute-snapshotsignal through its signal table); the engine skips what it already has. From 0.5.5 the engine that takes over logs a warning naming those sources (taking the pair over: changes the other engine took from Debezium after its last snapshot are not sent again; ...); - a
dsmltarget (from 0.6.0) numbers its files from the snapshot's sequence number, so its next files carry numbers the far side has already read past: start a new generation of file names and send a snapshot, as When the connected side's numbers go back says; - the reconciliation finds what is already in the targets: an LDAP entry already there is updated in place, a SCIM or Entra ID resource is adopted.
So nothing is lost, Debezium sources and dsml targets aside, but a takeover after a long
interval has more to read and reconcile. From 0.5.0
queued password changes are not lost either while the passive engine follows the queue
(syncd_ha_password_follower_connected is 1 on the active engine); a change the old engine had
delivered just before it was lost may be delivered once more (the same password, set twice).
Configurations. The engine that takes over adopts the configuration file in the snapshot when
its host settings (engine.data_dir, api, engine.ha) are the same as its own, so publishing
to the active engine is enough. When they differ, it runs its own: publish to both.
Limitations¶
- No etcd backend. The lease is in PostgreSQL, a shared file or, from 0.5.0, a Kubernetes Lease. Changing the lease kind of a running pair needs both engines stopped first.
- The passive engine is as fresh as the last snapshot for everything but the password queue. A capture agent enrolled, or a password key rotated, after the last snapshot is lost with the active engine (the agent enrolls again).
- Password changes without a second copy. A change accepted while the passive engine was not following the queue, and not delivered when the active engine is lost, is not delivered by the engine that takes over. The person's next change is.
- Self-service and agents. The console sends a self-service change to the member that holds
the lease (from 0.4.1, when
CONSOLE_SELF_SERVICE_ENGINEnames one engine of the pair). From 0.5.0 an agent may reach either engine; while neither holds the lease, agents are answeredunavailableand keep their changes in their spools. Self-service through the replicated queue was not run end to end. See Password synchronisation. - Sealed password keys need the same passphrase on both engines, since the snapshots carry the key files as they are (see The password keys). A change of passphrase was not run on a pair.
- Measured small. Incremental snapshots were measured at 3,000 people, never near the 1.6 GB archive a store of 3 million entities made before 0.5.0. A pair of mixed versions (during an upgrade) is designed to fall back to whole snapshots, but was not run.
syncdctl haopens no firewall port: open 7443 between the hosts yourself (see Installation).- Tested on Kubernetes in kind only. From 0.5.0 a
kind-haCI job installs a pair, fails it over and hands it over, once with a PostgreSQL lease and once with a Kubernetes Lease; it passed in the run that published the 0.6.0 images and chart, whose publishing waits for it. 0.6.1's run failed before it, and published no images or chart. No cloud cluster was used. The pair is tested end to end on hosts. - Debezium sources after a takeover resume from Debezium's own position, not the snapshot's: catch up with an incremental snapshot (above).
- The lease's store is a dependency. Without the lease's database (or, with a Kubernetes
lease, the API server) neither engine can hold the lease, and nothing is exported
(
SyncdHaNoActive). Run the database with your own replication or failover. A freshly started engine waits one lease duration before taking over a Kubernetes lease whose holder is gone.
On Kubernetes, without a pair¶
The engine is a StatefulSet with one replica, and its store is on a ReadWriteOnce volume. If its
node fails, Kubernetes starts the pod again where the volume can be attached, and the engine
carries on from its last commit. A StatefulSet does not replace a pod on a node that stops
answering until the node is known to be gone, so that two engines never share the volume; that
wait, and attaching the volume elsewhere, is your outage. With engine.ha.enabled, each engine
has its own volume, and the passive one takes over within the lease's TTL instead (with the lease
in the console's database, or from 0.5.0 in a Kubernetes Lease, engine.ha.lease.kind). The console's
Deployment can be rescheduled anywhere, as it keeps nothing in its pod.
What else keeps syncd running¶
- Automatic restart. Both systemd units restart on failure, from 0.5.5 after 10 seconds,
growing to 5 minutes over six failures in a row (5 seconds every time before; 10 seconds every
time with systemd older than 254), with no start limit; on Kubernetes, the pods restart, and
the engine's liveness probe restarts an engine that stops answering
/metrics. From 0.5.5 the console's background tasks (the mail and webhook senders, the engine status watcher, the audit outputs) are started again when they stop, and its/healthznames one that keeps stopping; the chart's probes use/livez, so such a task does not take the console's pages out of service. The engine starts again from its last commit; a full sync that was interrupted resumes where it stopped. - Supervised sources. A source that fails is restarted from its last committed checkpoint,
with waits that double from 1 second up to
engine.source_retry_max_secs(60). Other sources keep flowing. - Directory failover. LDAP and Active Directory connections take
failover_urls, tried in order whenurldoes not answer (see Connectors). - Target outages. When a target directory goes away, the engine keeps reading and committing
its sources; exports to that target go to the dead-letter queue and are sent again by
syncd retryor the next reconciliation once it answers. Withwritebackon a publication, changes made in the target during the outage are written back first. From 0.5.1 an LDAP or Active Directory target that is down when the engine starts or reloads is reported down and connected later, instead of failing the start (or rolling a published configuration back); a restored previous configuration that does not start either is tried again every 5 seconds, doubling up to a minute, instead of the engine exiting. Adsmltarget (from 0.6.0) that cannot write its file keeps its exports in the store and tries again within a minute; none goes to the dead-letter queue. - Timers survive restarts. Effective dates, leaver stages, change windows, canaries and group expiry are kept in the store, and acted on at their time whether the engine ran throughout or was restarted (or, in a pair, failed over).
- The console is not in the data path. If the console or its database is down, the engine keeps synchronising; only management (publishing, approvals, the live status page) waits. A pair is the exception when its lease is in the console's database; from 0.5.0, a pair on Kubernetes can keep it in a Lease object instead.
- The license never stops sync. From 0.5.0 an expired license, or none past the evaluation and grace period, only blocks publishing configuration changes (see syncd licensing).
- The database is yours: run the console's PostgreSQL with your own replication or failover,
and point
CONSOLE_DATABASE_URL(and a pair'sSYNCD_HA_LEASE_URL) at it.
Cold standby is still an option without a pair: a second host with the same release installed and its services stopped, with backups available to it (see Recovering on a new host). Never start it while the primary could still be running, or both engines export.
Disaster recovery¶
What to keep, and where¶
| Item | Holds | Back it up with |
|---|---|---|
The engine store, /var/lib/syncd/engine |
Entities, their source records, checkpoints of each source, what was exported, dead letters, held changes, timers, history; the password keys (from 0.5.0 also previous ones, password.key.<id>) and the agents' CA (and a previous one during a rotation) when passwords are on |
syncd backup --to or engine.backup (the running engine, a consistent checkpoint), or syncdctl backup (stops the engine while it copies). A copy of the files taken while the engine runs is not consistent |
| The console's database | Accounts, role assignments, settings, registered engines, configuration versions, the audit trail, API tokens, webhooks, environments, scheduled reports, the HA lease; from 0.5.0 also the installation id, the license and its usage history, the configuration signing key and the WebAssembly modules | syncdctl backup --to (pg_dump beside the engine's archive), syncdctl backup, or your database's own backups |
The master key, /var/lib/syncd/console/master.key (or CONSOLE_MASTER_KEY) |
Decrypts the stored engine client keys, webhook addresses and secrets, secret environment values and, from 0.5.0, the configuration signing key. With CONSOLE_MASTER_KEY_KMS (new in 0.5.0) the file holds it wrapped, and the KMS key is needed to open it |
syncdctl backup (host-local), syncdctl backup --to from 0.4.1 (<name>.console-master.key), and a copy kept apart from the backups. engine.backup and syncd backup do not include it |
The password-key passphrase (the file SYNCD_PASSWORD_KEY_PASSPHRASE_FILE names), when the password keys are sealed |
Opens the sealed password keys and agents' CA key, in the store and in every backup and snapshot. With SYNCD_PASSWORD_KEY_PASSPHRASE_KMS (new in 0.5.0) the file holds it wrapped, and the KMS key is needed to open it |
A copy kept apart from the backups: a restore needs it. Keep the file outside /etc/syncd, for example in /etc/syncd-keys/: from 0.5.0 syncdctl backup --to leaves a passphrase file inside /etc/syncd out of its archive, with a warning |
/etc/syncd |
console.env, engine.env (secrets, S3 keys, how to reach a vault), engine/engine.yaml, and the control API's CA and certificates; from 0.5.0, a license installed with syncdctl license install (license.lic) and the console's signing key for signed configurations (pki/console-signing.pub) |
syncdctl backup --to (<name>.etc.tar.gz), syncdctl backup, or your configuration management. It holds secrets |
nginx's configuration and certificate, or the console's own (CONSOLE_TLS_CERT) |
HTTPS for the console | Your configuration management |
| The release | The bundle or package you installed | Keep the download, with SHA256SUMS (and SHA256SUMS.asc for a signed release; 0.5.0, 0.5.1, 0.5.4, 0.5.5, 0.6.0 and 0.6.1 are unsigned). The portal's Downloads page keeps earlier versions too, as does the GitHub release. On Kubernetes, the newest published images and chart are 0.6.0's, signed with cosign; 0.6.1 published none |
A dsml connector's files (from 0.6.0) |
On the connected side, the target's sequence number and the exports waiting for its next file, which are in the store; the files written, in the outbox and on their way. On the far side, the source's checkpoint (the last file read, each writer's last sequence number), in its store | The store's backups carry the sequence number, the waiting exports and the checkpoint. A store restored from a backup carries on from them as they were then: read Recovery in the air-gap guide (on the connected side, When the connected side's numbers go back) before restoring either side |
| People, accounts, groups | The source systems and the target directories | Their own backups. The engine reads the sources again |
| The audit trail | Also in your SIEM, when the console sends it there (the journal, ENS_AUDIT_*) |
The SIEM's own retention |
| A WebAssembly module next to a configuration written by hand on the engine's host (from 0.5.0) | A rule package's custom functions | Your configuration management: such a module is in neither backups nor HA snapshots. Modules uploaded in the console are in its database |
Backups hold the password keys as they are on disk
The engine's password key (password.key, and from 0.5.0 previous keys password.key.<id>
until they are retired) and the agents' CA key are files in the data directory. Every backup (host-local, off-host and scheduled) and every HA snapshot copies them
as they are. Without a passphrase they are in the clear, protected on disk only by their mode
(0600): anyone who can read a backup can open password changes sealed to that key. From 0.4.1,
SYNCD_PASSWORD_KEY_PASSPHRASE_FILE seals them, so backups and snapshots carry ciphertext (see
The password keys); backups taken before still hold
them in the clear. Restrict the backup directory or bucket in any case, and turn on S3
server-side encryption (--sse, engine.backup.sse, or the bucket's default). The 0.4.0
documentation said the key was already encrypted on disk; it was not.
Keep backups off the host. From 0.4.0 the engine writes them there itself: a directory on a mounted share, or S3 (with MinIO and other S3-compatible stores), by hand or on a schedule:
A scheduled backup holds the engine's part (the store, its configuration file, the key material).
Add the console's database and /etc/syncd with syncdctl backup --to from a timer of your own,
or your own database and configuration backups. SyncdBackupStale alerts when no scheduled backup
has succeeded for two intervals. Commands and S3 credentials are in
Backups.
On Kubernetes, see Backups on Kubernetes.
Your recovery point is your backup interval for what syncd owns: configuration versions, accounts and audit events recorded after the last backup of the console's database are lost (the audit events stay in your SIEM if they were sent there). The identity data itself is not: after a restore, the engine reads its sources again and catches up. Password changes delivered after the backup are not sent again.
Recovering on a new host¶
-
Install the same release that was running, with
--no-start, and the same database choice: -
Restore the backup.
From an off-host backup (
syncdctl backup --to), with the S3 credentials in/etc/syncd/engine.envfirst:This restores the engine store, the console's database from the dump,
/etc/syncdfrom its archive, keeping the new host's own PKI (which the new console's database does not match: runsudo syncdctl renew-certsafterwards, which gives the console the new host's credentials), and, from 0.4.1, the console's master key. Give it the S3 options the backup was taken with (--endpoint,--region,--s3-ca). The backed-up configuration is put beside the live one as/var/lib/syncd/engine/engine.restored.yaml: compare it withsyncd config diffand publish the one you want. A backup taken with 0.4.0 has no master key: copymaster.keyback from where you keep it, to/var/lib/syncd/console/master.key(ownersyncd-console, mode 0600), before the console starts. When the password keys were sealed, put the passphrase file, from where you keep it apart, at the pathSYNCD_PASSWORD_KEY_PASSPHRASE_FILEnames in the restoredengine.env(readable bysyncd) before the engine starts; a passphrase or master key wrapped by a KMS needs the new host to reach that KMS, or the program does not start.From a host-local backup directory copied off the old host: copy it to
/var/lib/syncd/backups/on the new host (root only, mode 0700), then:If the new host's console database URL differs from the old one's, correct
CONSOLE_DATABASE_URLin the backup'setc/console.envfirst: the restore puts that file back before it loads the database dump, and loads the dump into the database it names. This puts back the engine store, the console's files with the master key,/etc/syncd(configuration, secrets, certificates), and the console's database, then starts the services. Sealed password keys need their passphrase, as above.The license, and the installation id it may be bound to, are in the console's database (for an engine without a console, in its store), so a restore keeps them.
-
The backup keeps the old host's numeric owners. If the
syncdandsyncd-consoleaccounts have other ids on the new host, the services cannot read their files: give them back the owners the installer sets, and restart.sudo chown -R syncd:syncd /var/lib/syncd/engine /etc/syncd/engine sudo chown -R syncd-console:syncd-console /var/lib/syncd/console sudo chown root:syncd /etc/syncd/engine.env /etc/syncd/pki/engine.key /etc/syncd/pki/cli.key sudo chown root:syncd-console /etc/syncd/console.env /etc/syncd/pki/console-client.key sudo systemctl restart syncd syncd-console -
Set up nginx and its certificate again, or the console's own certificate (Installation), and check
CONSOLE_PUBLIC_URL; update your identity provider's redirect URI if the address changed. - Check:
sudo syncdctl status;sudo syncd statusshows every source running and no unreachable target; sign in to the console; Audit log → Verify chain reports the chain intact. From 0.5.5 a host installed with--no-startcounts as an installation that has not finished, andsyncdctl statussaysinstall: NOT FINISHED: once the restore (and therenew-certsabove) is done,sudo syncdctl registerfinishes it (the engine is registered already, which it accepts). - Let the engine catch up: each source carries on from its checkpoint in the restored store, and
full reads pick up what changed since.
sudo syncd reconcilecompares every target with what should be there now.
Without an engine store backup, the engine starts empty and reads every source in full, then
exports. Expect the initial-load memory and time. Staged leaver clocks,
held changes and timers start over. Without the master key, the console refuses to start over
its sealed secrets. Restore the key; if it is lost for good, start it with
CONSOLE_NEW_MASTER_KEY=true and register the engine again (see
The master key).
A pair. The surviving engine is the recovery: it takes over by itself. To rebuild the other host, install it as in An active/passive pair on hosts and start it, with the pair's password-key passphrase if the keys are sealed: it starts passive and pulls a snapshot, with nothing to restore. To restore a pair from a backup, stop both engines, restore on one, start that one first, then the other.
Backups on Kubernetes¶
The chart takes no backups, and syncdctl does not run there. Back up these:
| Item | How |
|---|---|
| The engine's store | engine.backup on a schedule, or kubectl -n syncd exec syncd-engine-0 -- syncd backup --to s3://backups/syncd/prod --keep 14, without stopping it. Or a VolumeSnapshot of data-syncd-engine-0, with the engine stopped so that the copy is consistent: kubectl -n syncd scale statefulset syncd-engine --replicas=0, take the snapshot, then scale it back (the next helm upgrade sets it back too) |
| The console's database | pg_dump --format=custom, or your database's own backups |
The syncd-console Secret |
kubectl -n syncd get secret syncd-console -o yaml, kept as a secret. It holds the master key, unless it comes from a Secret of your own (console.masterKey.existingSecret, new in 0.5.1; see GitOps): then keep that one |
The password-key passphrase Secret (engine.passwordKeyPassphrase), when you use one |
Your own copy of the passphrase, kept apart from the backups: the chart neither creates nor keeps it |
The license Secret (console.license.existingSecret, new in 0.5.0), when you use one |
Your copy of the license file; the portal can issue it again |
The syncd-pki Secret is worth keeping with them, but need not be: without it the chart issues new
certificates and its registration Job gives the console the new credentials. From chart 0.4.0 it
is kept by helm uninstall.
S3 credentials reach the engine's pod the way they reach any AWS client:
- IRSA or EKS Pod Identity: from 0.5.0 give the engine a service account of its own with the
role's annotation (
engine.serviceAccount, see Service accounts); the engine exchanges the web identity token with STS itself. On EKS the pod identity webhook adds the projected token andAWS_WEB_IDENTITY_TOKEN_FILEandAWS_ROLE_ARNto the pods of an annotated account; without it, mount a projected token withengine.extraVolumesandextraVolumeMountsand set the two variables inengine.env. This was not run on EKS. - Static keys: a Secret with
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY, asengine.envFromSecret(the same Secret as the sources' passwords, or another). - An S3-compatible store in the cluster (MinIO):
endpoint: http://minio.minio.svc:9000inengine.backup, withca_filenaming a file fromengine.extraCaCertificates(new in 0.5.0; see CA certificates) for a private CA. WithnetworkPolicy.egress.enabled, add its port toegress.extra.
Restoring, into the same release name and namespace:
- Put the
syncd-consoleSecret back (kubectl apply -f) before installing, so the chart reuses its master key instead of generating one, the passphrase Secret when the password keys are sealed, and the license Secret when you use one. - Restore the console's database into an empty database (drop and create it first, then
pg_restore --no-owner), the oneconsole.databasenames. - The engine's store, either way:
- From an off-host backup: scale the engine to 0, then run
syncd restore --from s3://backups/syncd/prod --replacein a pod with the engine's image and thedata-syncd-engine-0claim mounted at/var/lib/syncd(a Job, orkubectl debug), with the same S3 credentials andSYNCD_CONFIG=/var/lib/syncd/engine.yaml, as the image's user (65532): from 0.5.1 the files it puts in place are mode 0600, so they must be the engine's. Then scale the engine back to 1 (2 for a pair). An archive without its manifest beside it, left by a failed backup of an earlier release, is not a backup: it is passed over, so delete it. - From a volume snapshot: create the PersistentVolumeClaim
data-syncd-engine-0from the snapshot (itsdataSource) before installing, so the StatefulSet uses it. With the release installed, scale the engine to 0 and delete the claim first.
- From an off-host backup: scale the engine to 0, then run
helm install(orhelm upgrade) the same chart version that took the backups, then check:kubectl -n syncd exec syncd-engine-0 -- syncd status, sign in, and Verify chain.
The volume keeps the files' owner, uid 65532, which is what the images run as, so no chown is
needed. The engine then catches up from its checkpoints, as on a host. For a pair, restore into
data-syncd-engine-0 with both pods scaled down: the other engine pulls a snapshot once the first
holds the lease. This procedure is documented in the source repository's runbook; it is not part
of the chart's CI test.
Moving from a host to Kubernetes¶
There is no tested procedure for moving a host install's store and console database into the chart. The simple way is a fresh start:
- Install the chart (see Install with Helm), with the secrets the configuration refers to in the engine's Secret.
- Export the running configuration from the host's console and import it into the new console,
then publish it there. Its
engineandapisections are the image's, not the host's. - Stop the host's engine (
sudo systemctl stop syncd) before the new engine's first full read, so that only one engine exports.
The new engine reads every source in full, with the initial-load memory and
time. Accounts, the audit trail and configuration versions stay in the host's console database;
keep its backups. An off-host backup of the host's engine can be restored into the pod's volume as
in Backups on Kubernetes, which keeps its checkpoints, held changes and
timers; this is untested across the move, and the restored configuration's engine and api
sections are the host's, so publish the configuration from the new console afterwards.
The audit trail after a restore¶
The console's audit trail is a hash-chained table in its database, restored with the same dump, so
the chain is intact but ends at the backup. Events recorded after the backup are lost from the
database. From 0.4.0 there are second copies outside it: every event is written as a JSON line to
the console's standard output (the journal or the pod log), and can go to an audit file, Splunk or
syslog (ENS_AUDIT_*), at least once and in order. Those copies keep the events the restore lost.
The console also logs the chain's head (audit log head) every hour when it moved: verifying the
restored trail against the last head logged before the backup shows it is intact up to it; a head
logged after the backup names an event the restore lost. See Security and
Audit logging.
Rolling back an upgrade¶
Every upgrade takes a backup before it changes anything. A failed upgrade of a bundle install rolls back by itself; to go back after a successful one:
- The previous release runs again, and the engine store and
/etc/syncdare restored from the backup taken before the upgrade. The engine picks up changes made since when it next reads its sources. - The console's database is restored only if the newer release changed its schema (from 0.5.5, or its schema is not known: the database did not answer when the backup was taken, or does not answer now). Otherwise its contents are kept: configuration versions, accounts and audit events written since the upgrade, and so are the control API's certificates, which the console's stored credentials match.
--keep-dataswitches the programs back and restores nothing. It is refused when the newer release migrated the store to a format the previous one cannot read, and from 0.5.1 when the console's schema is not the one the previous release's console had; from 0.5.5 also when that cannot be checked, unless--skip-schema-checkis added.- An upgrade taken with
--skip-db-backup(orSYNCD_SKIP_DB_BACKUP=1) has no copy of the database. From 0.5.5 its rollback keeps the database when its schema is the one the previous release had, and is refused, before anything is stopped, when it is not or is not known: restore the database from a backup of your own first. Back it up yourself before such an upgrade if you may want to go back across a schema change, as from 0.5.5 to 0.5.4. - From 0.5.1
rollbackchecks first that/var/lib/syncdhas room to copy the backup's store and console files in beside the live ones, and restores the data before it switches the programs back, so a rollback whose restore fails can be run again. The automatic rollback of a failed upgrade removes the failed release's store first, and needs no more room than the backup took.
From 0.6.1 to 0.6.0, nothing changes: the store's format (2), the console's schema (33) and
the configuration are the same, so the console's database is kept, and --keep-data, a package
downgrade or helm rollback can keep the store too. 0.6.1 changed only the host installer:
0.6.0's cannot finish an installation that stopped while it issued the certificates (see
Finishing an installation). On Kubernetes there is
nothing to roll back: no 0.6.1 chart or images were published.
From 0.6.0 to 0.5.5, neither the store's format nor the console's schema changed, and the store is kept. Two things first:
- A
dsmltarget with exports waiting. Adsmltarget keeps its files' sequence number, and the exports waiting for the end of the interval, as settings beside the data, which 0.5.5 ignores. Runsudo syncd reconcilebefore rolling back: it writes out what is waiting. - A configuration with a
dsmlconnector is refused by 0.5.5. Before rolling back with the store kept (--keep-data, a package downgrade orhelm rollback), publish a configuration without it. A fullsyncdctl rollbackrestores the configuration file from the backup taken before the upgrade, which had none.
From 0.5.5 to 0.5.4, the console's schema changed (30 to 33: publish leases, the published
flag of engine configurations, the expiry of one-time passwords), so the rollback restores the
console's database from the backup taken before the upgrade, and loses everything recorded in the
console since; --keep-data is refused, as 0.5.4's console would not start on the newer database.
The store's format is the same (2), and the store comes back from the same backup. On Kubernetes,
restore the console's database into an empty database before helm rollback. What 0.5.5 fixed
comes back with 0.5.4, its three critical fixes included: prefer fixing forward. The upgrade
section is Upgrading from 0.5.4 to 0.6.1.
From 0.6.1 or 0.6.0 straight back to 0.5.4, after an upgrade that went past 0.5.5, both of
the above apply: run syncd reconcile first when a dsml target has exports waiting; the
rollback restores the console's database and the store from the backup taken before the upgrade,
with the configuration file that had no dsml connector. The steps are in
Rolling back 0.6.1, 0.6.0 or 0.5.5.
From 0.5.4 to 0.5.2 or 0.5.1, neither the store's format nor the console's schema changed, so
the console's database is kept, and --keep-data, a package downgrade or helm rollback can keep
the store too. See Rolling back 0.5.4 to 0.5.2 or 0.5.1.
From 0.5.1 to 0.5.0, the console's schema changed (29 to 30, migration 0030), so the rollback
restores the console's database from the backup taken before the upgrade, and loses everything
recorded in the console since; --keep-data is refused, as 0.5.0's console would not start on
the newer database. The store's format is the same (2), and the store comes back from the same
backup. What 0.5.1 fixed comes back with 0.5.0, the critical fixes included: prefer fixing
forward. See Rolling back 0.5.1 to 0.5.0.
From 0.5.0 to 0.4.1, the console's schema changed (17 to 29, migrations 0018 to 0029), so the
rollback restores the console's database from the backup taken before the upgrade, and loses
everything recorded in the console since: configuration versions, role assignments, licenses and
audit entries. The store's format changed too (1 to 2), and 0.4.1 refuses a format-2 store, so
the rollback restores the store taken before the upgrade, and --keep-data is refused: what 0.5.0
kept in the store (agents enrolled, keys rotated, password changes queued since) is lost with it.
0.4.1 also refuses a configuration with 0.5.0's settings where the configuration file is kept.
The details are in Rolling back 0.5.0 to 0.4.1.
From 0.4.1 to 0.4.0, neither the store's format nor the console's schema changed, so the
console's database is kept. 0.4.0 cannot open sealed password keys: a full rollback restores the
plain files with the store; with --keep-data, a package downgrade or helm rollback, put the
plain files back first. See Rolling back 0.4.1 to 0.4.0.
From 0.4.0 to 0.3.0, the console's schema changed (8 to 17), so the rollback restores the
console's database, dropping the tables 0.4.0 added, and loses everything recorded in the console
since the upgrade: configuration versions, accounts, API tokens, webhooks, environments, reports
and audit entries. The store's format did not change, so --keep-data is allowed; but 0.3.0
ignores the timers and held changes 0.4.0 keeps in the store, and refuses a configuration with
0.4.0's settings, so publish one without them first. Take an HA pair apart before rolling back.
The details are in Rolling back 0.4.0 to 0.3.0.
Package installs: install the previous package version with your package manager, then
sudo syncdctl restore /var/lib/syncd/backups/<time>-upgrade-<old>-to-<new>. A full restore
always restores the console's database, so anything recorded in the console since the upgrade is
lost.
Kubernetes: helm rollback puts back the previous images and values only. It restores neither
the engine's volume nor the console's database, nor any Secret. A rollback to a release that
cannot read the store's format leaves the engine refusing to start (the store has format N,
written by a newer syncd), and a console older than its database's schema may not start either:
restore the backups taken before the upgrade (see Backups on Kubernetes),
then roll back. From chart 0.6.0 to 0.5.5, nothing needs restoring, but run syncd reconcile in
the engine's pod first when a dsml target has exports waiting, and publish a configuration
without a dsml connector (there is no chart 0.6.1 to roll back from). From chart 0.5.5 to 0.5.4,
restore the console's database into an empty database, and the engine's store from the same
time. From chart 0.5.4 to 0.5.2 or 0.5.1, nothing needs restoring. From chart 0.5.1 to
0.5.0, restore the console's database into an empty
database, and the engine's store from the same time. From chart 0.5.0 to 0.4.1, restore both the
console's database into an empty database and the engine's store (0.4.1 refuses the format-2
store), and publish a configuration without 0.5.0's settings first; a pair on the Kubernetes lease
needs both engine pods stopped, as for any change of lease kind. From chart 0.4.0 to 0.3.0, restore the
console's database into an empty database,
turn engine.ha.enabled off first if it is on, and publish a configuration without 0.4.0's
settings.
Details are in Installation. The release build tests upgrade, failed upgrade, rollback, backup and restore on every release, under systemd; still, practise a rollback on a test installation before you rely on it.