2021-01-13 12:47:54 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-01-13 13:46:39 +00:00
|
|
|
package control;
|
2021-01-13 12:47:54 +00:00
|
|
|
|
2021-01-15 06:23:21 +00:00
|
|
|
import "pkg/services/control/types.proto";
|
2021-01-13 12:47:54 +00:00
|
|
|
|
2023-03-07 13:38:26 +00:00
|
|
|
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control";
|
2021-01-13 12:47:54 +00:00
|
|
|
|
2021-01-13 13:46:39 +00:00
|
|
|
// `ControlService` provides an interface for internal work with the storage node.
|
|
|
|
service ControlService {
|
2021-01-13 12:47:54 +00:00
|
|
|
// Performs health check of the storage node.
|
|
|
|
rpc HealthCheck (HealthCheckRequest) returns (HealthCheckResponse);
|
2021-01-14 16:06:49 +00:00
|
|
|
|
2023-02-03 16:58:09 +00:00
|
|
|
// Sets status of the storage node in FrostFS network map.
|
2021-01-15 11:51:15 +00:00
|
|
|
rpc SetNetmapStatus (SetNetmapStatusRequest) returns (SetNetmapStatusResponse);
|
2021-02-21 07:20:04 +00:00
|
|
|
|
|
|
|
// Mark objects to be removed from node's local object storage.
|
|
|
|
rpc DropObjects (DropObjectsRequest) returns (DropObjectsResponse);
|
2021-12-17 12:27:36 +00:00
|
|
|
|
|
|
|
// Returns list that contains information about all shards of a node.
|
|
|
|
rpc ListShards (ListShardsRequest) returns (ListShardsResponse);
|
2021-12-27 15:28:34 +00:00
|
|
|
|
|
|
|
// Sets mode of the shard.
|
|
|
|
rpc SetShardMode (SetShardModeRequest) returns (SetShardModeResponse);
|
2022-01-24 10:13:37 +00:00
|
|
|
|
2022-05-16 16:31:50 +00:00
|
|
|
// Synchronizes all log operations for the specified tree.
|
|
|
|
rpc SynchronizeTree (SynchronizeTreeRequest) returns (SynchronizeTreeResponse);
|
2022-09-13 10:28:08 +00:00
|
|
|
|
|
|
|
// EvacuateShard moves all data from one shard to the others.
|
|
|
|
rpc EvacuateShard (EvacuateShardRequest) returns (EvacuateShardResponse);
|
2022-09-21 10:51:51 +00:00
|
|
|
|
|
|
|
// FlushCache moves all data from one shard to the others.
|
|
|
|
rpc FlushCache (FlushCacheRequest) returns (FlushCacheResponse);
|
2023-04-07 11:21:05 +00:00
|
|
|
|
|
|
|
// Doctor performs storage restructuring operations on engine.
|
|
|
|
rpc Doctor (DoctorRequest) returns (DoctorResponse);
|
2021-01-13 12:47:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Health check request.
|
|
|
|
message HealthCheckRequest {
|
|
|
|
// Health check request body.
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of health check request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Health check request.
|
|
|
|
message HealthCheckResponse {
|
|
|
|
// Health check response body
|
|
|
|
message Body {
|
2023-02-03 16:58:09 +00:00
|
|
|
// Status of the storage node in FrostFS network map.
|
2021-01-15 09:42:31 +00:00
|
|
|
NetmapStatus netmap_status = 1;
|
2021-01-15 10:18:03 +00:00
|
|
|
|
|
|
|
// Health status of storage node application.
|
|
|
|
HealthStatus health_status = 2;
|
2021-01-13 12:47:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Body of health check response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2021-01-14 16:06:49 +00:00
|
|
|
|
2021-01-15 11:51:15 +00:00
|
|
|
// Set netmap status request.
|
|
|
|
message SetNetmapStatusRequest {
|
|
|
|
// Set netmap status request body.
|
|
|
|
message Body {
|
2023-02-03 16:58:09 +00:00
|
|
|
// New storage node status in FrostFS network map.
|
2022-10-18 15:42:14 +00:00
|
|
|
// If status is MAINTENANCE, the node checks whether maintenance is
|
|
|
|
// allowed in the network settings. In case of prohibition, the request
|
|
|
|
// is denied. Otherwise, node switches to local maintenance state. To
|
|
|
|
// force local maintenance, use `force_maintenance` flag.
|
2021-01-15 11:51:15 +00:00
|
|
|
NetmapStatus status = 1;
|
2022-10-18 15:42:14 +00:00
|
|
|
|
|
|
|
// MAINTENANCE status validation skip flag. If set, node starts local
|
|
|
|
// maintenance regardless of network settings. The flag MUST NOT be
|
|
|
|
// set for any other status.
|
|
|
|
bool force_maintenance = 2;
|
2021-01-15 11:51:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Body of set netmap status request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set netmap status response.
|
|
|
|
message SetNetmapStatusResponse {
|
|
|
|
// Set netmap status response body
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of set netmap status response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2021-02-21 07:20:04 +00:00
|
|
|
|
|
|
|
// Request to drop the objects.
|
|
|
|
message DropObjectsRequest {
|
|
|
|
// Request body structure.
|
|
|
|
message Body {
|
|
|
|
// List of object addresses to be removed.
|
2023-02-03 16:58:09 +00:00
|
|
|
// in FrostFS API binary format.
|
2021-02-21 07:20:04 +00:00
|
|
|
repeated bytes address_list = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of the request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Response to request to drop the objects.
|
|
|
|
message DropObjectsResponse {
|
|
|
|
// Response body structure.
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of the response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2021-12-17 12:27:36 +00:00
|
|
|
|
|
|
|
// Request to list all shards of the node.
|
|
|
|
message ListShardsRequest {
|
|
|
|
// Request body structure.
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of the request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ListShards response.
|
|
|
|
message ListShardsResponse {
|
|
|
|
// Response body structure.
|
|
|
|
message Body {
|
|
|
|
// List of the node's shards.
|
|
|
|
repeated ShardInfo shards = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of the response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2021-12-27 15:28:34 +00:00
|
|
|
|
|
|
|
// Request to set mode of the shard.
|
|
|
|
message SetShardModeRequest {
|
|
|
|
// Request body structure.
|
|
|
|
message Body {
|
|
|
|
// ID of the shard.
|
2022-10-10 17:54:14 +00:00
|
|
|
repeated bytes shard_ID = 1;
|
2021-12-27 15:28:34 +00:00
|
|
|
|
|
|
|
// Mode that requested to be set.
|
|
|
|
ShardMode mode = 2;
|
2022-01-31 15:15:33 +00:00
|
|
|
|
|
|
|
// Flag signifying whether error counter should be set to 0.
|
|
|
|
bool resetErrorCounter = 3;
|
2021-12-27 15:28:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Body of set shard mode request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetShardMode response.
|
|
|
|
message SetShardModeResponse {
|
|
|
|
// Response body structure.
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of set shard mode response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2022-01-24 10:13:37 +00:00
|
|
|
|
2022-05-16 16:31:50 +00:00
|
|
|
// SynchronizeTree request.
|
|
|
|
message SynchronizeTreeRequest {
|
|
|
|
// Request body structure.
|
|
|
|
message Body {
|
|
|
|
bytes container_id = 1;
|
|
|
|
string tree_id = 2;
|
|
|
|
// Starting height for the synchronization. Can be omitted.
|
|
|
|
uint64 height = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of restore shard request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SynchronizeTree response.
|
|
|
|
message SynchronizeTreeResponse {
|
|
|
|
// Response body structure.
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of restore shard response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2022-09-13 10:28:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
// EvacuateShard request.
|
|
|
|
message EvacuateShardRequest {
|
|
|
|
// Request body structure.
|
|
|
|
message Body {
|
|
|
|
// ID of the shard.
|
2022-10-10 17:54:14 +00:00
|
|
|
repeated bytes shard_ID = 1;
|
2022-09-13 10:28:08 +00:00
|
|
|
|
|
|
|
// Flag indicating whether object read errors should be ignored.
|
|
|
|
bool ignore_errors = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// EvacuateShard response.
|
|
|
|
message EvacuateShardResponse {
|
|
|
|
// Response body structure.
|
|
|
|
message Body {
|
|
|
|
uint32 count = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2022-09-21 10:51:51 +00:00
|
|
|
|
|
|
|
// FlushCache request.
|
|
|
|
message FlushCacheRequest {
|
|
|
|
// Request body structure.
|
|
|
|
message Body {
|
|
|
|
// ID of the shard.
|
2022-10-10 17:54:14 +00:00
|
|
|
repeated bytes shard_ID = 1;
|
2022-09-21 10:51:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// FlushCache response.
|
|
|
|
message FlushCacheResponse {
|
|
|
|
// Response body structure.
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
2023-04-07 11:21:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Doctor request.
|
|
|
|
message DoctorRequest {
|
|
|
|
// Request body structure.
|
|
|
|
message Body {
|
|
|
|
// Number of threads to use for the operation.
|
|
|
|
uint32 concurrency = 1;
|
|
|
|
// Flag to search engine for duplicate objects and leave only one copy.
|
|
|
|
bool remove_duplicates = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Doctor response.
|
|
|
|
message DoctorResponse {
|
|
|
|
// Response body structure.
|
|
|
|
message Body {
|
|
|
|
}
|
|
|
|
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|