Say why the data store couldn't be opened, with an exit code per case #472

Merged
jcoffey-dev merged 1 commits from feat/startup-data-store-errors into main 2026-11-19 04:33:41 +00:00
Owner

K-S6 (#429). Every failure to open the data store at start-up used to exit with 1 and the driver's message, so nothing could tell a database that's down from a wrong password. The chart's pre-flight check (K-C5) needs to.

Each case now gets its own first words, an exit code from sysexits.h, and a one-line hint: bad configuration 78, unreachable 69, credentials refused 77, TLS failed 76, anything else 1. PostgreSQL errors are told apart fully. Other stores report bad configuration and otherwise 1. The table is in crates/store/src/registry/startup.rs.

I ran the release build against nine broken configs on the lab's PostgreSQL: bad JSON, unknown store type, missing secret file, refused, unknown host, timeout, wrong password, missing database, and TLS the server doesn't offer. Each one gave the expected code and line. The lab's five server pods run this build and pass the sign-in test. Unit tests cover the classification.

Docs: inbuxa/inbuxa.org PR, held for rc.32.

K-S6 (#429). Every failure to open the data store at start-up used to exit with 1 and the driver's message, so nothing could tell a database that's down from a wrong password. The chart's pre-flight check (K-C5) needs to. Each case now gets its own first words, an exit code from sysexits.h, and a one-line hint: bad configuration 78, unreachable 69, credentials refused 77, TLS failed 76, anything else 1. PostgreSQL errors are told apart fully. Other stores report bad configuration and otherwise 1. The table is in `crates/store/src/registry/startup.rs`. I ran the release build against nine broken configs on the lab's PostgreSQL: bad JSON, unknown store type, missing secret file, refused, unknown host, timeout, wrong password, missing database, and TLS the server doesn't offer. Each one gave the expected code and line. The lab's five server pods run this build and pass the sign-in test. Unit tests cover the classification. Docs: inbuxa/inbuxa.org PR, held for rc.32.
jcoffey-dev added 1 commit 2026-11-19 04:04:49 +00:00
Say why the data store couldn't be opened, with an exit code per case
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 11m28s
a00040289c
Every start-up failure to open the data store exited with 1 and the
driver's own words, so a supervisor, a Kubernetes pre-flight check or a
person reading pod status couldn't tell a database that's down from a
wrong password. Now each case has its own first words and exit code
(sysexits.h), and a one-line hint:

  78  data store: bad configuration    settings file, secret files, database name
  69  data store: unreachable          refused, unknown host, timed out, starting, full
  77  data store: credentials refused  wrong user or password, missing permission
  76  data store: TLS failed           handshake failed
  1   data store: error                anything else

PostgreSQL errors are told apart fully; other stores report bad
configuration and otherwise 1. K-S6.
jcoffey-dev merged commit 536b17e6d9 into main 2026-11-19 04:33:41 +00:00
jcoffey-dev deleted branch feat/startup-data-store-errors 2026-11-19 04:33:41 +00:00
Sign in to join this conversation.