From b5f6af30ee1bfd012e87d5d6bc8b8f2cfe7a8074 Mon Sep 17 00:00:00 2001 From: Vasil Averyanau Date: Mon, 16 Dec 2024 16:09:08 +0100 Subject: [PATCH 1/2] feat(swagger): extends sm agent `/node_info' with `storage_size`. This extends `/node_info` agent response with `storage_size` - total disk size in bytes. It's needed for the backup manifest and should be calculated on the agent side. Refs: #4130 --- v3/swagger/agent.json | 4 ++++ v3/swagger/gen/agent/models/node_info.go | 3 +++ 2 files changed, 7 insertions(+) diff --git a/v3/swagger/agent.json b/v3/swagger/agent.json index 63876d786..a4cabeb1e 100644 --- a/v3/swagger/agent.json +++ b/v3/swagger/agent.json @@ -1687,6 +1687,10 @@ "data_directory": { "description": "First entry from `data_file_directories` list from scylla config file.", "type": "string" + }, + "storage_size": { + "description": "Disk size of the first entry from `data_file_directories` list from scylla config file. In bytes.", + "type": "integer" } } } diff --git a/v3/swagger/gen/agent/models/node_info.go b/v3/swagger/gen/agent/models/node_info.go index f85a11728..a903ffec0 100644 --- a/v3/swagger/gen/agent/models/node_info.go +++ b/v3/swagger/gen/agent/models/node_info.go @@ -95,6 +95,9 @@ type NodeInfo struct { // Whether Scylla supports uuid-like sstable naming. SstableUUIDFormat bool `json:"sstable_uuid_format,omitempty"` + // Disk size of the first entry from `data_file_directories` list from scylla config file. In bytes. + StorageSize int64 `json:"storage_size,omitempty"` + // Uptime in seconds. Uptime int64 `json:"uptime,omitempty"` } From 9dd26bd45ea0cebc08b74c8fadb9141f59b4fb50 Mon Sep 17 00:00:00 2001 From: Vasil Averyanau Date: Mon, 16 Dec 2024 16:30:14 +0100 Subject: [PATCH 2/2] fix(swagger): adds type format uint64 for the `storage_size`. --- v3/swagger/agent.json | 5 +++-- v3/swagger/gen/agent/models/node_info.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/v3/swagger/agent.json b/v3/swagger/agent.json index a4cabeb1e..028871831 100644 --- a/v3/swagger/agent.json +++ b/v3/swagger/agent.json @@ -1689,8 +1689,9 @@ "type": "string" }, "storage_size": { - "description": "Disk size of the first entry from `data_file_directories` list from scylla config file. In bytes.", - "type": "integer" + "description": "Total disk size of the first entry from `data_file_directories` list from scylla config file. In bytes.", + "type": "integer", + "format": "uint64" } } } diff --git a/v3/swagger/gen/agent/models/node_info.go b/v3/swagger/gen/agent/models/node_info.go index a903ffec0..c2ed167db 100644 --- a/v3/swagger/gen/agent/models/node_info.go +++ b/v3/swagger/gen/agent/models/node_info.go @@ -95,8 +95,8 @@ type NodeInfo struct { // Whether Scylla supports uuid-like sstable naming. SstableUUIDFormat bool `json:"sstable_uuid_format,omitempty"` - // Disk size of the first entry from `data_file_directories` list from scylla config file. In bytes. - StorageSize int64 `json:"storage_size,omitempty"` + // Total disk size of the first entry from `data_file_directories` list from scylla config file. In bytes. + StorageSize uint64 `json:"storage_size,omitempty"` // Uptime in seconds. Uptime int64 `json:"uptime,omitempty"`