Files
seaweedfs/weed/admin/view
Chris Lu 8f6db360da admin: warn on dashboard when cluster nodes run mixed versions (#12196)
* admin: warn on dashboard when cluster nodes run mixed versions

A partially-finished upgrade leaves servers on different releases, and
nothing surfaces that drift today. The dashboard now compares the
binary version reported by every node:

- volume servers are asked directly via VolumeServerStatus (the
  heartbeat topology carries no version), fanned out with bounded
  concurrency and a 60s cache since versions only change on restart
- filers, S3 servers, and message brokers already report their version
  over KeepConnected; ListClusterNodes returns it, the dashboard just
  never read the field
- masters are excluded: raft membership does not carry versions

When every node matches, the Cluster panel shows the shared version.
When they differ, a warning banner calls out the mixed cluster and the
panel lists each node type with its count grouped by version, e.g.
"31x 4.39, 24x 4.44". Version columns on the volume server, filer, and
S3 tables (and the dedicated volume servers page) identify which nodes
are stale. Versions are compared without the volume-size-limit prefix
("8000GB 4.44 abc123" -> "4.44 abc123") so capacity config does not
masquerade as version drift; nodes reporting nothing count as
"unknown".

* admin: run the volume version queries concurrently, not under the map lock

The per-server VolumeServerStatus call ran while holding the versions
mutex, so the semaphore-bounded fan-out was fully serialized: every
server's RPC waited for the previous one, up to the 3s timeout each.

* admin: export the volume server table's real columns

The new Version cell shifted every later column, so the CSV read the
version as Rack and dropped Max Volumes, EC Shards and Usage a slot
early. Map the cells the table actually renders and add Version to the
export.

* admin: warn on mixed versions only when nodes report versions

An empty or master-only cluster produced a non-uniform summary with an
empty node list, which rendered the "Mixed cluster versions detected"
banner and warning icon over nothing. Mixed() requires reported nodes,
and the version card shows a dash when none answered.
2026-10-29 00:13:51 -07:00
..