Repository navigation
3.2.0 RC fixes: storage changes reach every control - #693
Merged
Merged
Conversation
traviswu-bigstack
force-pushed
the
travis.wu/storage-fanout-any-node
branch
from
October 15, 2026 04:21
6095174 to
e923de6
Compare
traviswu-bigstack
force-pushed
the
travis.wu/storage-fanout-any-node
branch
5 times, most recently
from
October 16, 2026 11:22
6abbbbc to
6cb14a5
Compare
traviswu-bigstack
marked this pull request as ready for review
October 16, 2026 11:22
traviswu-bigstack
force-pushed
the
travis.wu/storage-fanout-any-node
branch
from
October 16, 2026 19:51
6cb14a5 to
3782eff
Compare
Contributor
Collaborator
|
@SekiXu Could you help review this PR? |
Collaborator
|
Sorry I missed this PR! Looking at it now. |
Collaborator
No worries! |
…s them
The VIP balances API requests across every control, but a storage or
model change was forwarded to peers only when the node handling it held
the VIP. Two times in three a create or delete from the UI configured one
node, and cinder-volume, a pacemaker singleton, often ran on another, so
the backend never came up.
Fan out unless the request was itself forwarded by a peer. Forwarded
requests carry their own header (X-Cube-Forwarded, the origin's
hostname), set only when forwarding: the Node header cannot mark them,
since a node calling the API with its node token (the CubeCOS storage
CLI) sends it too and would never be fanned out. Also fix the
createStorage case name.
On start the storage operator now clears this node's unfinished storage
and storage-model requests: it called RemoveHostPendingReq, whose filter
({host, status.isUpdating}) is the fixpack/tuning shape, so a request
interrupted by an API restart stayed processing for good.
Fixes #692
Signed-off-by: Travis Wu <travis.wu@bigstack.co>
…art per change
The CLI's device tier create/delete and storage set/delete applied the
Cinder side only on the node it ran on, while cinder-volume, a pacemaker
singleton, often runs on another control (cubecos#2098). Move that
fan-out into the API, as it already does for storages.
GET /integrations/storages/tiers [{name, state}]
POST /integrations/storages/tiers {name, osdIds}
DELETE /integrations/storages/tiers/:tierName
A tier's Ceph part (device class, CRUSH rule, pool, volume type) runs
once, on the node handling the request; its registry entry and Cinder
apply run on every control. Delete refuses a tier still in use,
unregisters it everywhere before the Ceph teardown, puts the registry
back on a failure that leaves the tier's objects in place, and drops the
tier's cube@<tier> cinder-volume service record (left "down" it failed
BlockStor). The endpoints are synchronous (the caller needs hex_sdk's
own error, and the steps are ordered across controls), one tier change
at a time per node, using the API's shared HTTP helper for peers.
Only the hex master's apply restarts cinder-volume, and it may finish
before the control hosting it has the new config (cube4510: a deleted
backend's pool came back ~90 s after the CLI returned). Storage create,
update and delete, and tier create and delete, now restart cinder-volume
once after every control has applied: the receiving control forwards
first, applies, waits (10 min bound) until each peer that accepted has
reported, then runs cinder_restart_volume and only then reports its own
result.
Needs cubecos's ceph_device_tier_register, cinder_restart_volume and
cinder_remove_volume_service.
Refs bigstack-oss/cubecos#2098
Signed-off-by: Travis Wu <travis.wu@bigstack.co>
… answering upgradeProgress only projected the shared roll job when its kind was upgrade, so during `cluster rolling_restart` every node read back as succeeded with no phase and isRollingApplied false. It now projects any in-flight roll from power_roll_status_json and reports its kind (upgrade or restart); the firmware logic built on the same progress still sees only an upgrade roll, and a restart projection is never written into progress.json. It also kept failing while a node went down: - progress.json was rewritten in place; a master that rebooted mid-write left it full of NUL bytes and the endpoint answered 500. Every writer now writes atomically (temp file, fsync, rename, dir fsync), and a file that does not parse falls back to the last good copy or is rebuilt. - while cephfs unmounts on a shutting-down node the roll state cannot be read: the endpoint serves the last projection (up to 2 min) or answers 503, instead of 500 or a 200 that shows a roll with no nodes. Refs bigstack-oss/cubecos#2115 Signed-off-by: Travis Wu <travis.wu@bigstack.co>
SekiXu
force-pushed
the
travis.wu/storage-fanout-any-node
branch
from
October 21, 2026 05:59
3782eff to
9299569
Compare
SekiXu
approved these changes
Oct 21, 2026
This was referenced Oct 22, 2026
6 tasks
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
Which issue(s) this PR fixes?
3.2.0 fixes found validating
CUBE_3.2.0_20261013-1455_dff3712aon cube4510 (3× R630 HA). One commit per issue; more rows are added as RC validation finds them.:8082across every control), not only from the VIP holder. Forwarded requests carry their ownX-Cube-Forwardedheader and are not forwarded again; theNodeheader cannot mark them, since the CubeCOS storage CLI calls the API with the node token too; on start the storage operator removes this node's unfinished storage/model requests (its filter matched fixpack records only)GET/POST /integrations/storages/tiersandDELETE /integrations/storages/tiers/{tierName}: the receiving node runs the Ceph part once, each peer control only registers/unregisters the tier, then cinder-volume restarts once; a delete then drops the tier'scube@<tier>cinder-volume service record (left "down" it failed BlockStor; warning only if that fails); synchronous (ordered across controls) with a per-node lock and registry rollback on failure. OpenAPI: bigstack-oss/cube-cos-openapi#123 (submodule bump) Storage create/update/delete: the receiving control waits until every peer has applied (their task records are gone, 10 min bound), then restarts cinder-volume once, so it never runs on a peer's stale config; the endpoints still answer 202 at onceupgradeProgressalso projects a rolling restart (isRollingApplied, per-node phase, newkind); upgrade behaviour unchanged;progress.jsonwritten atomically (temp + fsync + rename); a corrupt file falls back to the last good copy or is rebuilt instead of a 500; while its node shuts down it serves the last roll projection (≤ 2 min) or 503, never 500 or an empty rollFixes #692
Refs bigstack-oss/cubecos#2098
What this PR does?
On cube4510 a storage created from the CubeCOS UI or API configured only the control that happened to handle it, so cinder-volume (running elsewhere) never got the backend. Paired with bigstack-oss/cubecos#2073 (
ceph.confslot in the RBD model, #2102), the UI now registers a remote Ceph that comes up on every control.Test results (optional)
1). make sure the api docs have been updated: tier endpoints and the upgradeProgress
kind/roll phases documented in bigstack-oss/cube-cos-openapi#123 (submodule bumped; merge that first).2). make sure the api works properly:
New
TestIsPeerRequestpasses;go vetis clean.Hot-deployed on cube4510 (all 3 controls,
.pre-fanoutbackups): UI Add Storage (Generic RBD, remote 1cc pool) →enabled_backends = ceph,oneccon all 3 controls,onecc@oneccup. Recorded with Playwright.Live on cube4510 (all 3 commits hot-deployed): from a non-master control, CLI
set_storage/delete_storageandstorage tier create/deletereached all 3 controls, and the cluster state when each CLI returned matched the state 60 s later. Tier delete leaves nocube@<tier>service record (BlockStor ok after a create/delete cycle, 2026-10-15).🤖 Generated with Claude Code
https://claude.ai/code/session_01Em9cqu7uUiUbXvYH4XNWML