Zum Inhalt springen

Upgrade

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

The schema migrates at boot with no operator gate and the migration set carries no downgrade path, so the backup is not a precaution taken around this procedure — it is the way back (ADR 0056 §6). Everything else below exists to keep that backup usable: to name the release you are leaving, and to notice a recipe change before it stops anything.

Which of these steps has ever been executed. veyqctl upgrade runs on every commit between published releases and the candidate, in pipeline lane L2 (below); before it existed it had run once, live, between two releases produced from two commits of the tree with images built on the host (--unsigned-local): a Memory sealed under the first was still open after it, the upgrade’s backup restored onto a fresh install, and its refusals were each provoked against a running instance with every container’s start time unchanged. Step 4’s capture is also rehearsed on every scripts/run_web_e2e.py run, and a restore of every schema state’s backup by lane L3 (below). Read it that way.

What proves an upgrade before a release — and what it does not (ADR 0091 decisions 6 and 7). Two stack lanes run on the images that ship, from releases you could be running:

  • Lane L2, upgrade in place (scripts/run_stack_upgrade.py, every pull request and push). The newest release, and in a leg of its own the newest release of the previous major (the one a new major is entered from, a fix release on its release/<N−1>.x branch included), is installed from its published files by its own veyqctl, every signature checked; that release’s own e2e seeder seals content of every application into it; its own veyqctl upgrade — step 4’s backup, the template check, the health wait — takes it to the candidate, which migrates it at its start, must report configSecretState: OK (step 7), and whose reader opens every item the seeder recorded — names, date and place, the cover, every photo and file byte for byte, the drop box’s guest files, and a READ link as its guest sees it — and whose browser test signs the owner in on a new device. Then the release’s own veyqctl rollback takes it back to that backup, and its own reader reads it again. A migration edited after it was released stops the upgrade, Flyway’s refusal named.
  • Lane L3, a backup of every schema state restored (scripts/run_stack_restore.py, every push). Every release’s backup is archived once, after it is released, by its own seeder and its own veyqctl backup with the object pool and the kept-apart key. The candidate restores the backup of the oldest release of each set of migrations of its major, and the previous major’s newest release’s, each into a fresh install with its own veyqctl restore --objects-from --key-from (the Backup and restore path), and reads it as above. A backup the selection names that is missing, or not signed by the archive’s own workflow, is red.

Every leg’s green is attested with the snapshot, and a release is promoted only from a snapshot whose L2 starting releases and L3 backups are still the ones the releases name. What it does not cover: the seeder writes through the API, so what only a browser writes is not in the content; a data format a release writes without a migration in the middle of a set of releases with the same migrations is restored only at the set’s edges; and it says nothing about the chart — helm upgrade from the predecessor’s chart to the candidate’s runs in no cluster; its immutable fields and claims are compared on rendered manifests by scripts/chart_upgrade_check.py (Upgrade, Kubernetes), and a cluster leg is inbox #430. Until 2026-11-28 a jar-level proof (scripts/run_web_e2e.py --upgrade: the predecessor’s own jar and suites, its capture restored onto the candidate’s jar) was the pipeline’s proof; it booted jars, not the published images, and stays a tool for bisecting a defect between two commits.

Terminal window
cd /opt/veyq
./veyqctl check # which release upgrade would take, and what is newer
./veyqctl upgrade --key-into /media/usb-stick/veyq-<stamp>.key
./veyqctl self-update # then: veyqctl itself, the newest release's

upgrade runs only when you run it, and in this order — nothing is stopped before step 4. Each step is a heading of its own; with -v (--verbose, on every command) it also shows every program it runs, with its arguments, so you can do it by hand.

  1. Resolve the release .env’s VEYQ_RELEASE selects (below). The running one: nothing to do. An older one: refused — there is no downgrade.

  2. Verify it and fetch its files into releases/<new>/, exactly as Verify a release shows: the manifest’s signature first, then both images’. A signature that does not verify stops it here, with nothing pulled.

  3. Check the new template against .env. Every key the new env.example assigns that .env lacks, and every ${VAR:?…} the new recipe or your compose.override.yml leaves unset, is refused by name: add it to .env and run upgrade again. A release that adds a required variable has no other way to reach you, and a setting that moved into the admin console leaves the template as a removed variable; a change you have to act on is named in that release’s notes (Versions and compatibility). upgrade then writes the next .env as .env.next (the new image lines, your values, every key the template does not name kept) and lets Compose check it: docker compose -f releases/<new>/docker-compose.prod.yml --env-file .env.next config --quiet. By hand, read the two diffs:

    Terminal window
    diff -u releases/<old>/env.example releases/<new>/env.example
    diff -u releases/<old>/docker-compose.prod.yml releases/<new>/docker-compose.prod.yml
  4. Back up, switch, start. With an object pool named (.env’s VEYQ_BACKUP_OBJECTS_TO, or --objects-to for this run), it first copies the store’s objects into the pool while the application still runs — objects are immutable, so that copy cannot go stale, and a failure there stops nothing. Then it stops the application — and only it: cold means the writer is stopped, and MariaDB and Garage stay up because the capture reads through their own interfaces (ADR 0056 §2). It captures the database and the store’s index with the running release’s own instance_backup.py into backups/<stamp>-before-<new>/ — the pool topped up with what arrived since, the objects otherwise staying in the store, which the upgrade never rewrites — leg (c) to the file --key-into names, and checks the capture — Backup and restore § Capture shows each command. A capture that fails switches nothing and starts the running release again. Then .env.next becomes .env, state.json names the new release, and the stack comes up on the new recipe: docker compose -f releases/<new>/docker-compose.prod.yml --env-file .env up -d --wait (plus your override). The schema migrates during this boot. There is no gate and no prompt. If the stack is not healthy, upgrade says so and names the way back (Rollback). It prints the downtime, from stopping the application to the new release healthy.

--key-into is required, refused before anything else runs when it is missing, already exists or lies inside backups/: the dump plus the key opens every tenant’s SMTP password, so they never sit side by side. Encrypt the capture before it leaves the host (Capture). The upgrade’s capture is kept at most B days, like every other — the instance’s backup retention, 30 until you set it: the way back from an upgrade exists for that long, so roll back within it, or keep a copy elsewhere and delete it by B (How long a backup is kept). The cluster’s gate keeps its captures the same way.

What names the release you are leaving. releases/<old>/ stays, with the manifest that names its images by digest, and the capture’s manifest.json records app.version. A release is <major>.<minor> and a publish onto an existing one fails rather than replacing it (ADR 0057), so that name is one fixed set of bits for good — a rollback target rather than a label.

Then verify, and not by “it started”. Open Server → Object store and run Check store (or veyq-admin store check): the store setting survives the upgrade in the database, and the check proves it still reaches its store. Read the instance’s config-secret state as the Server Owner on the admin channel — the admin console’s Server → Config-secret key, or veyq-admin config-secret — and expect OK; then have a person sign in and open a Memory that contains media. That is the one assertion touching all three legs at once — the row, the object and the key are three different failures wearing the same “it looked fine”.

VEYQ_RELEASE in .env is the release line (ADR 0096 decisions 4–5):

VEYQ_RELEASE upgrade takes
1.4 Nothing: the release is pinned. check still says what is newer
1 The newest release of major 1
latest The newest release, one major at a time (below)

A new major is entered only from the release it was tested from. A major is where something is removed, and the path the release pipeline tests into a release of a new major is the one from its entry: the newest release of the previous major when it was cut. Each release names its entry in its signed manifest (majorEntry); a jump from any other release across those removals is a path nobody tested. So when the selected release lies in a later major and you run an older release than its entry, upgrade goes to the entry first, and ends by saying that the next upgrade enters the next major. One run never crosses more than one major. With 1.3 running and 2.5 the newest of all, entered from 1.9, latest takes 1.9, and the next run 2.5. From 1.9 with 3.1 listed it takes the newest of major 2, never 3.1. A pin in the next major, 2.3, is reached directly from its entry.

A fix release of the old major can come out after the new major’s first release (1.10 after 2.0, which was entered from 1.9). It is no way into 2.0: nobody tested 1.10 → 2.0, and 1.10 may hold changes 2.0 does not. From 1.3, latest still takes 1.9 and then 2.0. Running 1.10, upgrade refuses until a release of major 2 entered from 1.10 or later is out; that release is the next one cut after 1.10. A next major with no release (a mirror that lacks it, or only a prerelease) is refused rather than crossed. veyqctl check says which release the next upgrade takes, and which major the one after it would enter. It reads that from the signed manifests, so it verifies them as upgrade does (--unsigned-local for a local build). Under Helm the chart’s backup gate, above, refuses any other entry: the same release. This rule is held by veyqctl’s self-test; no published release has crossed into a major yet but 1, entered from v0.2480.

Decided (ADR 0085). This is the promise veyq means to keep from V1 on. Major 0 is pre-release and promises nothing. The release you run and the version clients check share one major. Major 1 began with v1.0 (2026-11-10); no train has left yet, and no installed app exists yet.

  • A release is <major>.<minor>. A minor only adds: it is safe to take. The major moves only when something is removed (an API operation, a setting you must act on), at most once a year, on 1 May, and only if a removal is pending. A security fix that cannot keep the API intact is the one exception: an unscheduled major that removes only the insecure piece.
  • The previous major gets security fixes until the next train. When a new major is released, the one before it keeps receiving minor releases with security fixes, and nothing else, until the following 1 May. You can take such a fix without leaving your major. After that train your major gets no more fixes.
  • What you must act on is named in that release’s notes, a removed configuration variable included.
  • Apps keep working across your upgrade window. An installed app speaks every major since the train before last, so after your major stops being current you have about two years to upgrade before an app asks you to. Apps that speak a new major ship before the server’s major does. The web client and the admin console come from the server’s own image and always match it.
  • veyqctl is a client too. veyqctl --version names its release. It refuses an instance or a release of a newer major than its own and says where to get a newer veyqctl. Within a major an older veyqctl still works, and says so when it is older than your instance: veyqctl self-update fetches the newest, for every instance you manage.
  • The bundled database upgrades itself. When a release moves the bundled MariaDB to a newer version, its first start backs up the database’s system tables and upgrades them, on Compose and Kubernetes alike. An upgraded database does not go back to the older MariaDB: the backup taken before the upgrade is the way back. A database you run yourself is yours to upgrade.
  • The precise release is for you. The sign-in page shows only the major; the release you run is in the console’s Server → Release.

Rollback is the backup plus the release you left, and both are nameable only because a release is immutable. The capture upgrade took is restored under the release you left — never under the new one: restored onto the new release, the same capture is accepted as an older backup and migrated up again at the next start, which repeats the failed upgrade instead of undoing it (the restore says so when it sees one). There is no other way back: the migrations carry no down path, so an instance that has booted on the new schema cannot be handed to the old image.

On Compose the rollback is in place. The capture holds the database and the store’s index, and the objects it needs are still in this instance’s own store, which the upgrade never rewrote:

Terminal window
cd /opt/veyq
./veyqctl rollback backups/<stamp>-before-<new> --key-from /media/usb-stick/veyq-<stamp>.key

It refuses, with nothing stopped, unless the capture’s release is still in releases/ and the capture verifies against the live store (every object its rows require is there, as indexed), and it asks before it empties the database (--yes where there is no terminal). Then it stops the application, empties the database, switches .env’s image lines and state.json back to the release you left, starts that release once so it migrates the empty schema, stops it, restores the capture with the check only, places the key and starts. The store is never written; objects uploaded under the failed release stay in it with no record that claims them. Server → Object store counts them under Objects no record claims, and deletes them after a 30-day grace once you confirm the bucket is this server’s alone — the rollback, like every restore, restarts that grace and withdraws an earlier confirmation (Operations). .env’s VEYQ_RELEASE is left as it was, so pin it to the release you went back to if the next upgrade should not try again. Then verify as Restore says.

A store that lost objects since the upgrade — the volume gone — is not a rollback any more but a restore onto a fresh instance, from the object pool (--objects-from, Restore). Under Helm: the previous chart and images by their digests, the database emptied, then the restore Job with the check only (Restore under Helm).

How far this is proven: lane L2 (scripts/run_stack_upgrade.py, How veyq is tested) is built to run on every change to veyq, and ran green from v1.318 and from v0.2480 on a developer machine (2026-11-27); its first run on GitHub is still to come. It does what this page says with the operator’s own tool: it installs the newest release — and, in a second leg, the last release of the previous major — from its published files with that release’s own veyqctl, every signature checked, writes content into it with that release’s own test code, runs that veyqctl’s upgrade to the version under test, reads every item back (the config-secret key first, then each Memory, photo and file byte for byte, and in a browser the owner signs in on a new device), then runs that veyqctl’s rollback to the backup the upgrade took and reads everything again with the older release’s own reader. src/tools/veyqctl_selftest.py holds the order and the refusals.