Upgrading the server
Audience: operators who move a running FerroPIX to a newer release.
Only the newest release is supported (Releases, upgrades and support), so plan to follow each release. What FerroPIX stores lists the state an upgrade carries across.
Before the upgrade
- Read the changelog for every version you skip. A change that asks something of you, such as a configuration key renamed or removed, says what to change (Changelog).
- Check the configuration with the new binary. Run
ferropix config checkof the new release over your configuration (Commands). A key a release renamed or removed is refused by name in that one release, and as an unknown key from the next release on, so upgrade one release at a time when you skip several, or read each skipped section’s Removed entries. - Back up the store. Dump schema
pixof the PostgreSQL database (pg_dump --schema=pix), and keep the filedb.data_key_filenames beside the dump in your secret store: the identifiers in the dump open only with that key. The migrations only move forward, so the backup is your way back.
The rollout
- Migrations.
serveapplies the pending migrations of its release when it starts, under the migrator’s advisory lock, so servers that start together apply each file once (The store). Withdb.migrate = false, runferropix db migrateof the new release first, as the role that may create in the schema, then start the new servers; a server that does not migrate refuses to start while a migration of its release is missing. - Scoring fields. When a release changes how the matcher normalises a field, the same step rewrites the stored scoring fields and blocking keys of every record, a thousand at a time, before the server takes traffic. A large store takes longer to start on such a release.
- The images. With the chart,
helm upgradeto the chart version of the release (The Helm chart); with compose, download the release’scompose.yamlor setFERROPIX_VERSION. Upgrade the console to the same release: it reads the operator documents of its own release. - The audit spool keeps its records across the restart, and the new
server delivers them. Stop the old server with
SIGTERM, so the requests in flight finish withinserver.shutdown_timeout.
Rolling back
Restore the backup and start the release it was taken under. Do not start
an older release against a store a newer one migrated: with db.migrate = true it refuses the migrations it does not know, and with db.migrate = false it would run against tables its code was not written for.
After the upgrade
GET {base}/health/readinessanswers200, andGET {base}/operator/dependenciesshows each upstream’s last outcome (Operations).ferropix config checkprints the configuration the server runs on, with the source of each value.- The sealing key is untouched by an upgrade; rotating it is its own step.