--upgrade-plan: what --upgrade-store would do, read only #457

Merged
jcoffey-dev merged 1 commits from feat/upgrade-plan into main 2026-11-18 21:01:21 +00:00
Owner

For the chart's upgrade hook (K-C9, tracker inbuxa/inbuxa-charts#14).

Why: the 2026.x → 27.1 crossing includes layout step 2→3, which isn't rolling-safe. A plain rolling update stalls: the new pod waits for the old ones to stop, and they never stop because the new one never gets ready (spike S5, inbuxa/inbuxa-k8s-lab#5). The hook has to stop every server pod first, but only when a step needs it. S5 said the hook should ask the server rather than hard-code that.

inbuxa --upgrade-plan boots like --upgrade-store, writes nothing, and prints one line of JSON:

{"newStore":false,"steps":[{"from":1,"to":2,"rollingSafe":true,"what":"…"},{"from":2,"to":3,"rollingSafe":false,"what":"…"}],"stopAllNodes":true,"store":1,"target":3}
Exit Meaning
0 Nothing to do (current, or a new store)
3 Steps to run, all rolling-safe
4 A step needs every other node stopped first
2 A newer release changed the store
1 Can't tell (pre-0.16 store, or an error); the message says why

The exit code is there because the image has sh but no jq.

Tested

  • store_version integration test (RocksDB): a current store, stores marked 1 and 2 (the steps and their rolling-safe flags), a newer store, and that the plan leaves the mark untouched. 1 test passes.
  • Unit test for steps_from.
  • The debug binary on a new RocksDB store prints newStore: true, exit 0. After --upgrade-store marks it: store 3, no steps, exit 0.
  • fmt ok. The lock gains one line (serde_json for the inbuxa crate).

Note: this branch adds lines next to the K-S5 comments that #454 renames, so whichever merges second may conflict. I'll rebase it.

For the chart's upgrade hook (K-C9, tracker inbuxa/inbuxa-charts#14). **Why:** the 2026.x → 27.1 crossing includes layout step 2→3, which isn't rolling-safe. A plain rolling update stalls: the new pod waits for the old ones to stop, and they never stop because the new one never gets ready (spike S5, inbuxa/inbuxa-k8s-lab#5). The hook has to stop every server pod first, but only when a step needs it. S5 said the hook should ask the server rather than hard-code that. **`inbuxa --upgrade-plan`** boots like `--upgrade-store`, writes nothing, and prints one line of JSON: ```json {"newStore":false,"steps":[{"from":1,"to":2,"rollingSafe":true,"what":"…"},{"from":2,"to":3,"rollingSafe":false,"what":"…"}],"stopAllNodes":true,"store":1,"target":3} ``` | Exit | Meaning | |---|---| | 0 | Nothing to do (current, or a new store) | | 3 | Steps to run, all rolling-safe | | 4 | A step needs every other node stopped first | | 2 | A newer release changed the store | | 1 | Can't tell (pre-0.16 store, or an error); the message says why | The exit code is there because the image has `sh` but no `jq`. **Tested** - `store_version` integration test (RocksDB): a current store, stores marked 1 and 2 (the steps and their rolling-safe flags), a newer store, and that the plan leaves the mark untouched. 1 test passes. - Unit test for `steps_from`. - The debug binary on a new RocksDB store prints `newStore: true`, exit 0. After `--upgrade-store` marks it: store 3, no steps, exit 0. - fmt ok. The lock gains one line (`serde_json` for the `inbuxa` crate). **Note:** this branch adds lines next to the K-S5 comments that #454 renames, so whichever merges second may conflict. I'll rebase it.
jcoffey-dev added this to the 27.1 milestone 2026-11-18 20:11:06 +00:00
jcoffey-dev added 1 commit 2026-11-18 20:47:08 +00:00
--upgrade-plan: what --upgrade-store would do, read only
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 13m46s
9f3aa90127
For the Helm chart's upgrade hook (K-C9). The 2026.x to 27.1 crossing has
a layout step that isn't rolling-safe: a rolling update stalls, because
the new pod waits for the old ones to stop. The hook has to stop every
server pod first, but only when a step needs it, which the server knows
and the chart shouldn't hard-code (S5).

inbuxa --upgrade-plan boots as --upgrade-store does, writes nothing, and
prints one line of JSON: the store's layout version, this build's, and
each step with whether it's rolling-safe. Its exit code is for a shell
to branch on: 0 nothing to do, 3 rolling-safe steps only, 4 a step needs
every other node stopped, 2 a newer release changed the store, 1 can't
tell.

The store_version integration test covers a current store, layout 1 and
2, and a newer store, and that the plan leaves the mark alone.
jcoffey-dev force-pushed feat/upgrade-plan from 7e61761de0 to 9f3aa90127 2026-11-18 20:47:08 +00:00 Compare
jcoffey-dev merged commit 369166a865 into main 2026-11-18 21:01:21 +00:00
jcoffey-dev deleted branch feat/upgrade-plan 2026-11-18 21:01:21 +00:00
Sign in to join this conversation.