Repository navigation
fix: pick #681, #693 (92995699) and #702 into release_3.2.0 (3.2.0) - #709
Merged
github-actions[bot] merged 3 commits intoOct 28, 2026
Merged
Conversation
…d ceph bucket (#1618)
The three storage charts on Home > Chart (bandwidth, IOPS, latency) were
empty on every cluster. Their eight Flux statements read the "ceph" InfluxDB
bucket. The ceph-mgr influx module that wrote that bucket was retired
(cubecos #1442), so the API returned 200 with empty read/write series.
The same per-OSD counters are exported by ceph-mgr's prometheus module. The
charts now query them the way the Grafana storage dashboard does:
- bandwidth: sum(rate(ceph_osd_op_{r_out,w_in}_bytes[w]))
- iops: sum(rate(ceph_osd_op_{r,w}[w]))
- latency: rate(..._latency_sum) / rate(..._latency_count) * 1000 (ms)
Behavior changes:
- Bandwidth is now the sum across OSDs. The old statement took the max of
one OSD per point, which did not match the IOPS chart or Grafana.
- Latency now follows the request's start/stop. It used to ignore them and
always read the last 62 minutes.
- A 0/0 latency step (no ops) reads 0, not NaN.
The rate window is max(step, 4m): Prometheus scrapes ceph every 60s, and
four scrapes keep one missed scrape from blanking a point.
New pieces:
- internal/prometheus: a small query_range client. It calls haproxy's
/prometheus route, which is the local server on a single node and the
thanos queriers in HA.
- store.prometheus.url config. Empty means http://<data center VIP>/prometheus,
the same host the InfluxDB client uses.
Removes the eight ceph-bucket statements and the helpers only they used.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: raven-pan-bigstack <raven.pan@bigstack.co>
(cherry picked from commit b0764d6)
Signed-off-by: raven-pan-bigstack <raven.pan@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> (cherry picked from commit 9299569) Signed-off-by: raven-pan-bigstack <raven.pan@bigstack.co>
GHSA-259r-337f-4rfw (CVE-2026-63209) is an out-of-bounds write in klauspost/compress's s2 decoder, fixed in v1.18.7. cube-cos-api takes v1.18.0 indirectly, through the mongo driver's zstd compressor, and the cubecos scan reports it on /usr/local/bin/cube-cos-api. go mod tidy changes nothing else. Verified on WORK_STATION with go1.27.2. The binary builds with GOWORK=off and links compress v1.18.7 (go version -m), go vet ./... reports nothing, and go test ./... passes in all 21 packages that have tests. Refs bigstack-oss/cubecos-private#257 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Seki Xu <seki.xu@bigstack.co> (cherry picked from commit e9d4cd2) Signed-off-by: raven-pan-bigstack <raven.pan@bigstack.co>
Eandalf-Bigstack
marked this pull request as ready for review
October 28, 2026 09:34
Eandalf-Bigstack
approved these changes
Oct 28, 2026
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?
Refs bigstack-oss/cubecos#1618
Refs bigstack-oss/cubecos#2115
Refs bigstack-oss/cubecos-private#257
developWhat this PR does?
Cherry-picks the three
developcommits whose tickets haveRelease = COS 3.2.0but which are not onrelease_3.2.0yet. To find them, I compared all 41developcommits since therelease_3.1.20fork with the upstream tickets. No commit onrelease_3.2.0belongs to a release other than 3.2.0. These three are the only 3.2.0 commits still missing. The other fivedevelop-only commits are dependabot bumps with no ticket, so this PR leaves them out.QA view
What changes on a 3.2.0 cluster:
cluster rolling_restart, upgrade progress now shows the restart roll and its phases, and it keeps answering while a node reboots. The two #2115 defects themselves (abort still reboots the draining node, no masakari maintenance) live in cubecossdk_power.sh. This PR does not fix them.Repo dependencies:
/prometheusthrough haproxy (single node: local Prometheus; HA: Thanos queriers) and on Prometheus scraping ceph. cubecosrelease_3.2.0has both: the haproxy route inconfig_haproxy.cpp, and the ceph scrape fix cubecos#1593 (develop twin of #1592).eba4190(rollkindand phases). cube-cos-ui already readsisRollingAppliedand the per-node phase, so the firmware update page gets the fix with no UI change. cube-cos-ui does not read the newkindfield yet.store.prometheus.urlin/etc/cube/api/cube-cos-api.yaml. Empty meanshttp://<data center VIP>/prometheus.Checklist:
GET /api/v1/metrics/storage-read-write-bytesreturns non-emptyread/write.cluster rolling_restart. Firmware upgrade progress shows a roll of kindrestartwith per-node phases. It is not "all succeeded".500.Developer view
8c9f3d90b0764d6binternal/prometheusquery_range client.internal/cubecos/storagemetric.goreplaces the Flux queries inmetric.go. Addsstore.prometheus.urltointernal/configandconfigs/cube-cos-api.yaml.template.8680918e92995699internal/cubecos/firmware.goprojects any in-flight roll frompower_roll_status_json, writesprogress.jsonatomically, and serves the last projection or503while the roll state cannot be read. Bumpsapi/cube-cos-openapi50979fd→eba4190(that doc commit only).2b287c11e9d4cd22go.mod/go.sum:klauspost/compressv1.18.0 → v1.18.7.cherry-pick -x -s), andgit patch-id --stablematches eachdevelopcommit.f0ded533,a90800d3).92995699was left out there. It is the only commit of 3.2.0 RC fixes: storage changes reach every control #693 that refs cubecos#2115.For rc builds. RC builds take cube-cos-api from
CUBE_COS_API_RPM(cubecoscore/component-refs.mk:11, stillv3.2.0-rc1from575bb9b). For the next RC to include this PR, someone has to build a new RPM and update that line, as with #707 and #708.Test results (optional)
1). make sure the api docs have been updated
task generateApiDocson this branch leaves no diff. The submodule bump comes from the picked commit.2). make sure the api works properly
On this branch, macOS arm64:
GOWORK=off CGO_ENABLED=1 go vet ./internal/...reports nothing.go test -count=1 ./internal/...: 372 passed, 0 failed.go mod tidyleaves no diff.Not built in the x86 container and not run against a cluster on this branch. The live-node results are in each source PR.
🤖 Generated with Claude Code