Skip to content

3.2.0 RC fixes: storage changes reach every control - #693

Merged
github-actions[bot] merged 3 commits into
developfrom
travis.wu/storage-fanout-any-node
Oct 21, 2026
Merged

github-actions[bot] merged 3 commits into
developfrom
travis.wu/storage-fanout-any-node

Conversation

@traviswu-bigstack

@traviswu-bigstack traviswu-bigstack commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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_dff3712a on cube4510 (3× R630 HA). One commit per issue; more rows are added as RC validation finds them.

Commit Issue Fix
c5e0d54 #692 Storage and storage-model changes fan out from whichever control handles the request (the VIP balances :8082 across every control), not only from the VIP holder. Forwarded requests carry their own X-Cube-Forwarded header and are not forwarded again; the Node header 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)
ccfbf91 bigstack-oss/cubecos#2098 New GET/POST /integrations/storages/tiers and DELETE /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's cube@<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 once
3782eff bigstack-oss/cubecos#2115 upgradeProgress also projects a rolling restart (isRollingApplied, per-node phase, new kind); upgrade behaviour unchanged; progress.json written 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 roll

Fixes #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.conf slot 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 TestIsPeerRequest passes; go vet is clean.

  • Hot-deployed on cube4510 (all 3 controls, .pre-fanout backups): UI Add Storage (Generic RBD, remote 1cc pool) → enabled_backends = ceph,onecc on all 3 controls, onecc@onecc up. Recorded with Playwright.

  • Live on cube4510 (all 3 commits hot-deployed): from a non-master control, CLI set_storage/delete_storage and storage tier create/delete reached all 3 controls, and the cluster state when each CLI returned matched the state 60 s later. Tier delete leaves no cube@<tier> service record (BlockStor ok after a create/delete cycle, 2026-10-15).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Em9cqu7uUiUbXvYH4XNWML

@traviswu-bigstack
traviswu-bigstack force-pushed the travis.wu/storage-fanout-any-node branch 5 times, most recently from 6abbbbc to 6cb14a5 Compare October 16, 2026 11:22
@traviswu-bigstack
traviswu-bigstack marked this pull request as ready for review October 16, 2026 11:22
@traviswu-bigstack
traviswu-bigstack requested review from a team and raven-pan as code owners October 16, 2026 11:22
@traviswu-bigstack
traviswu-bigstack force-pushed the travis.wu/storage-fanout-any-node branch from 6cb14a5 to 3782eff Compare October 16, 2026 19:51
@raven-pan

Copy link
Copy Markdown
Contributor

Hi @Eandalf @SekiXu

I don't have enough understanding about Ceph and storage to review this PR.
Could you review this PR, Thanks for help!

@Eandalf-Bigstack

Copy link
Copy Markdown
Collaborator

@SekiXu Could you help review this PR?

@SekiXu

SekiXu commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Sorry I missed this PR! Looking at it now.

@Eandalf-Bigstack

Eandalf-Bigstack commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Sorry I missed this PR! Looking at it now.

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
SekiXu force-pushed the travis.wu/storage-fanout-any-node branch from 3782eff to 9299569 Compare October 21, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

done Merge the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Storage changes reach peer controls only when the VIP holder handles the request

5 participants