--check: whether the data, blob store and coordinator can be used #473

Merged
jcoffey-dev merged 2 commits from feat/check-data-layer into main 2026-11-19 06:27:29 +00:00
Owner

For the chart's pre-flight check (K-C5, inbuxa/inbuxa-charts#5). inbuxa --config <path> --check opens the data store the way a start does. It then writes, reads and deletes one small object in the blob store, and connects to NATS once, prints a line per part, and exits. It starts nothing and claims no node id.

The data layer needed a check of its own. A start doesn't fail on a broken blob store or NATS: NATS is retried in the background, and a blob store that can't be built is only an error in the build report. So a pod with a wrong S3 key or NATS password used to come up looking healthy.

A part that can't be used is reported as <part>: <case>: ..., with the exit codes from #472. S3 failures are told apart by HTTP status, and NATS ones by the connect error's kind. startup.rs now names the part (data store, blob store, coordinator) and has a hint for each.

Tested on kind with the release build (inbuxa-k8s-lab check-test.sh): six cases each gave the right part, case and exit code. They were nothing broken, wrong PostgreSQL, S3 and NATS credentials, and NATS or S3 not reachable. The lab's server pods run it as their init container and pass the sign-in tests. Unit tests cover the S3 classification.

For the chart's pre-flight check (K-C5, inbuxa/inbuxa-charts#5). `inbuxa --config <path> --check` opens the data store the way a start does. It then writes, reads and deletes one small object in the blob store, and connects to NATS once, prints a line per part, and exits. It starts nothing and claims no node id. The data layer needed a check of its own. A start doesn't fail on a broken blob store or NATS: NATS is retried in the background, and a blob store that can't be built is only an error in the build report. So a pod with a wrong S3 key or NATS password used to come up looking healthy. A part that can't be used is reported as `<part>: <case>: ...`, with the exit codes from #472. S3 failures are told apart by HTTP status, and NATS ones by the connect error's kind. `startup.rs` now names the part (data store, blob store, coordinator) and has a hint for each. Tested on kind with the release build (inbuxa-k8s-lab `check-test.sh`): six cases each gave the right part, case and exit code. They were nothing broken, wrong PostgreSQL, S3 and NATS credentials, and NATS or S3 not reachable. The lab's server pods run it as their init container and pass the sign-in tests. Unit tests cover the S3 classification.
jcoffey-dev added 1 commit 2026-11-19 05:09:56 +00:00
--check: whether the data, blob store and coordinator can be used
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Failing after 11m27s
5b7b119ceb
For the Helm chart's pre-flight init container (K-C5). It opens the data
store as a start does, then writes, reads and deletes one small object in
the blob store and connects to NATS once, without the background retrying
the server itself does. Each part prints a line; one that can't be used
says so as '<part>: <case>: ...' with K-S6's exit codes (78 bad
configuration, 69 unreachable, 77 credentials refused, 76 TLS failed).
It starts nothing and claims no node id.

S3 failures are told apart by HTTP status, or the client's error when
there was none; NATS by the connect error's kind.
jcoffey-dev added 1 commit 2026-11-19 06:14:13 +00:00
Modification notice on bootstrap.rs
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 12m47s
ff145da31e
jcoffey-dev merged commit 387aa27f1c into main 2026-11-19 06:27:29 +00:00
jcoffey-dev deleted branch feat/check-data-layer 2026-11-19 06:27:29 +00:00
Sign in to join this conversation.