diff --git a/doc/api/garage-admin-v2.json b/doc/api/garage-admin-v2.json index 853cc1f8..885b7355 100644 --- a/doc/api/garage-admin-v2.json +++ b/doc/api/garage-admin-v2.json @@ -2443,7 +2443,7 @@ "knownNodes", "connectedNodes", "storageNodes", - "storageNodesOk", + "storageNodesUp", "partitions", "partitionsQuorum", "partitionsAllOk" @@ -2483,7 +2483,7 @@ "description": "the number of storage nodes currently registered in the cluster layout", "minimum": 0 }, - "storageNodesOk": { + "storageNodesUp": { "type": "integer", "description": "the number of storage nodes to which a connection is currently open", "minimum": 0 @@ -4409,4 +4409,4 @@ "bearerAuth": [] } ] -} \ No newline at end of file +} diff --git a/src/api/admin/api.rs b/src/api/admin/api.rs index 5524e002..fc2d9b76 100644 --- a/src/api/admin/api.rs +++ b/src/api/admin/api.rs @@ -258,7 +258,7 @@ pub struct GetClusterHealthResponse { /// the number of storage nodes currently registered in the cluster layout pub storage_nodes: usize, /// the number of storage nodes to which a connection is currently open - pub storage_nodes_ok: usize, + pub storage_nodes_up: usize, /// the total number of partitions of the data (currently always 256) pub partitions: usize, /// the number of partitions for which a quorum of write nodes is available diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index 09f59d63..f42c84cf 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -134,7 +134,9 @@ impl RequestHandler for GetClusterHealthRequest { known_nodes: health.known_nodes, connected_nodes: health.connected_nodes, storage_nodes: health.storage_nodes, - storage_nodes_ok: health.storage_nodes_ok, + // Translating storage_nodes_up (admin API context) to storage_nodes_ok (metrics context) + // TODO: when releasing major release, consider renaming all the fields in the metrics to storage_nodes_up + storage_nodes_up: health.storage_nodes_ok, partitions: health.partitions, partitions_quorum: health.partitions_quorum, partitions_all_ok: health.partitions_all_ok,