mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-27 16:48:58 +00:00
5594b18912
* fix(ecstore): make delete_volume non-recursive by default to prevent bucket-heal wipe (backlog#799 B1) `delete_volume` unconditionally `remove_dir_all`'d the whole bucket tree, and the bucket-heal "remove" branch called it fire-and-forget on every local disk. A mis-classified "dangling" bucket (or a non-force S3 DeleteBucket on a populated bucket) was therefore recursively wiped — a potential whole-bucket data loss. The `VolumeNotEmpty` -> recreate/`BucketNotEmpty` handling already present in both delete_bucket paths was dead code because the primitive never refused. Add an explicit `force_delete` flag to `DiskAPI::delete_volume` and default the non-force path to a non-recursive `remove_dir` (rmdir), which fails atomically with `VolumeNotEmpty` if the bucket still holds any object data. Only an explicit force delete (S3 force bucket delete) removes recursively. Mirrors MinIO's `xlStorage.DeleteVol` (`Remove` vs `RemoveAll`). - Trait + all impls (local behavior, dispatch, disk_store, remote RPC) take the flag; the gRPC `DeleteVolumeRequest` gains a `force` field (proto3 default false → old peers get the safe non-recursive behavior on rolling upgrade). - Heal remove branch passes `false` and no longer discards the result: a `VolumeNotEmpty` refusal is logged (the bucket is not dangling) instead of wiping data. - Both `delete_bucket` paths pass `opts.force`, activating the previously-dead `VolumeNotEmpty` -> `BucketNotEmpty`/recreate handling (correct S3 semantics). Adds a regression test: non-force delete of a non-empty bucket returns VolumeNotEmpty and preserves the data; force delete removes it. Design converged by two independent expert reviews (MinIO-fidelity + defense-in-depth) referencing MinIO xl-storage.go. Refs backlog#799 (B1), issue rustfs/backlog#850. The safety expert's deeper hardening (typed capability instead of a bool, trash-instead-of-in-place for force, quorum re-verification of dangling) is noted on #850 as follow-up. * fix(ecstore): reword 'mis-classified' -> 'misclassified' to satisfy typos (backlog#799 B1) * fix(rustfs): thread force_delete through StorageDiskRpcExt::delete_volume + test literal (backlog#799 B1)
959 lines
23 KiB
Protocol Buffer
959 lines
23 KiB
Protocol Buffer
// Copyright 2024 RustFS Team
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
syntax = "proto3";
|
|
package node_service;
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
message Error {
|
|
uint32 code = 1;
|
|
string error_info = 2;
|
|
}
|
|
|
|
message PingRequest {
|
|
uint64 version = 1;
|
|
bytes body = 2;
|
|
}
|
|
|
|
message PingResponse {
|
|
uint64 version = 1;
|
|
bytes body = 2;
|
|
}
|
|
|
|
message HealBucketRequest {
|
|
string bucket = 1;
|
|
string options = 2;
|
|
}
|
|
|
|
message HealBucketResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message ListBucketRequest {
|
|
string options = 1;
|
|
}
|
|
|
|
message ListBucketResponse {
|
|
bool success = 1;
|
|
repeated string bucket_infos = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message MakeBucketRequest {
|
|
string name = 1;
|
|
string options = 2;
|
|
}
|
|
|
|
message MakeBucketResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message GetBucketInfoRequest {
|
|
string bucket = 1;
|
|
string options = 2;
|
|
}
|
|
|
|
message GetBucketInfoResponse {
|
|
bool success = 1;
|
|
string bucket_info = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message DeleteBucketRequest {
|
|
string bucket = 1;
|
|
}
|
|
|
|
message DeleteBucketResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message ReadAllRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
}
|
|
|
|
message ReadAllResponse {
|
|
bool success = 1;
|
|
bytes data = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message WriteAllRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
bytes data = 4;
|
|
}
|
|
|
|
message WriteAllResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message DeleteRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
string options = 4;
|
|
}
|
|
|
|
message DeleteResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message VerifyFileRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
string file_info = 4;
|
|
}
|
|
|
|
message VerifyFileResponse {
|
|
bool success = 1;
|
|
string check_parts_resp = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message ReadPartsRequest {
|
|
string disk = 1;
|
|
string bucket = 2;
|
|
repeated string paths = 3;
|
|
}
|
|
|
|
message ReadPartsResponse {
|
|
bool success = 1;
|
|
bytes object_part_infos = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message CheckPartsRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
string file_info = 4;
|
|
}
|
|
|
|
message CheckPartsResponse {
|
|
bool success = 1;
|
|
string check_parts_resp = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message RenamePartRequest {
|
|
string disk = 1;
|
|
string src_volume = 2;
|
|
string src_path = 3;
|
|
string dst_volume = 4;
|
|
string dst_path = 5;
|
|
bytes meta = 6;
|
|
}
|
|
|
|
message RenamePartResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message RenameFileRequest {
|
|
string disk = 1;
|
|
string src_volume = 2;
|
|
string src_path = 3;
|
|
string dst_volume = 4;
|
|
string dst_path = 5;
|
|
}
|
|
|
|
message RenameFileResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message WriteRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
bool is_append = 4;
|
|
bytes data = 5;
|
|
}
|
|
|
|
message WriteResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
// message AppendRequest {
|
|
// string disk = 1; // indicate which one in the disks
|
|
// string volume = 2;
|
|
// string path = 3;
|
|
// bytes data = 4;
|
|
// }
|
|
//
|
|
// message AppendResponse {
|
|
// bool success = 1;
|
|
// optional Error error = 2;
|
|
// }
|
|
|
|
message ReadAtRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
int64 offset = 4;
|
|
int64 length = 5;
|
|
}
|
|
|
|
message ReadAtResponse {
|
|
bool success = 1;
|
|
bytes data = 2;
|
|
int64 read_size = 3;
|
|
optional Error error = 4;
|
|
}
|
|
|
|
message ListDirRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string dir_path = 3;
|
|
int32 count = 4;
|
|
}
|
|
|
|
message ListDirResponse {
|
|
bool success = 1;
|
|
repeated string volumes = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message WalkDirRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
bytes walk_dir_options = 2;
|
|
}
|
|
|
|
message WalkDirResponse {
|
|
bool success = 1;
|
|
string meta_cache_entry = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message RenameDataRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string src_volume = 2;
|
|
string src_path = 3;
|
|
string file_info = 4;
|
|
string dst_volume = 5;
|
|
string dst_path = 6;
|
|
bytes file_info_bin = 7;
|
|
}
|
|
|
|
message RenameDataResponse {
|
|
bool success = 1;
|
|
string rename_data_resp = 2;
|
|
optional Error error = 3;
|
|
bytes rename_data_resp_bin = 4;
|
|
}
|
|
|
|
message MakeVolumesRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
repeated string volumes = 2;
|
|
}
|
|
|
|
message MakeVolumesResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message MakeVolumeRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
}
|
|
|
|
message MakeVolumeResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message ListVolumesRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
}
|
|
|
|
message ListVolumesResponse {
|
|
bool success = 1;
|
|
repeated string volume_infos = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message StatVolumeRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
}
|
|
|
|
message StatVolumeResponse {
|
|
bool success = 1;
|
|
string volume_info = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message DeletePathsRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
repeated string paths = 3;
|
|
}
|
|
|
|
message DeletePathsResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message ReadMetadataRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
string path = 3;
|
|
}
|
|
|
|
message ReadMetadataResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
bytes data = 3;
|
|
}
|
|
|
|
message UpdateMetadataRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
string path = 3;
|
|
string file_info = 4;
|
|
string opts = 5;
|
|
bytes file_info_bin = 6;
|
|
bytes opts_bin = 7;
|
|
}
|
|
|
|
message UpdateMetadataResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message WriteMetadataRequest {
|
|
string disk = 1; // indicate which one in the disks
|
|
string volume = 2;
|
|
string path = 3;
|
|
string file_info = 4;
|
|
bytes file_info_bin = 5;
|
|
}
|
|
|
|
message WriteMetadataResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message ReadVersionRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
string path = 3;
|
|
string version_id = 4;
|
|
string opts = 5;
|
|
bytes opts_bin = 6;
|
|
}
|
|
|
|
message ReadVersionResponse {
|
|
bool success = 1;
|
|
string file_info = 2;
|
|
optional Error error = 3;
|
|
bytes file_info_bin = 4;
|
|
}
|
|
|
|
message BatchReadVersionRequest {
|
|
string disk = 1;
|
|
string batch_read_version_req = 2;
|
|
bytes batch_read_version_req_bin = 3;
|
|
}
|
|
|
|
message BatchReadVersionResponse {
|
|
bool success = 1;
|
|
repeated string batch_read_version_resps = 2;
|
|
optional Error error = 3;
|
|
repeated bytes batch_read_version_resps_bin = 4;
|
|
}
|
|
|
|
message ReadXLRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
string path = 3;
|
|
bool read_data = 4;
|
|
}
|
|
|
|
message ReadXLResponse {
|
|
bool success = 1;
|
|
string raw_file_info = 2;
|
|
optional Error error = 3;
|
|
bytes raw_file_info_bin = 4;
|
|
}
|
|
|
|
message DeleteVersionRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
string path = 3;
|
|
string file_info = 4;
|
|
bool force_del_marker = 5;
|
|
string opts = 6;
|
|
// msgpack payloads mirroring the JSON fields above (grpc-optimization P2). Senders dual-write
|
|
// both; receivers prefer the *_bin form and fall back to the JSON string when it is empty.
|
|
bytes file_info_bin = 7;
|
|
bytes opts_bin = 8;
|
|
}
|
|
|
|
message DeleteVersionResponse {
|
|
bool success = 1;
|
|
string raw_file_info = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message DeleteVersionsRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
repeated string versions = 3;
|
|
string opts = 4;
|
|
// msgpack payloads mirroring the JSON fields above (grpc-optimization P2). Senders dual-write
|
|
// both; receivers prefer the *_bin form and fall back to the JSON string when it is empty.
|
|
repeated bytes versions_bin = 5;
|
|
bytes opts_bin = 6;
|
|
}
|
|
|
|
message DeleteVersionsResponse {
|
|
bool success = 1;
|
|
repeated string errors = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
message ReadMultipleRequest {
|
|
string disk = 1;
|
|
string read_multiple_req = 2;
|
|
bytes read_multiple_req_bin = 3;
|
|
}
|
|
|
|
message ReadMultipleResponse {
|
|
bool success = 1;
|
|
repeated string read_multiple_resps = 2;
|
|
optional Error error = 3;
|
|
repeated bytes read_multiple_resps_bin = 4;
|
|
}
|
|
|
|
message DeleteVolumeRequest {
|
|
string disk = 1;
|
|
string volume = 2;
|
|
// When false (default), a non-empty volume is refused (VolumeNotEmpty); when
|
|
// true, the volume is deleted recursively. Old peers omit this field, which
|
|
// decodes to false — the safe, non-recursive behavior (backlog#799 B1).
|
|
bool force = 3;
|
|
}
|
|
|
|
message DeleteVolumeResponse {
|
|
bool success = 1;
|
|
optional Error error = 2;
|
|
}
|
|
|
|
message DiskInfoRequest {
|
|
string disk = 1;
|
|
string opts = 2;
|
|
}
|
|
|
|
message DiskInfoResponse {
|
|
bool success = 1;
|
|
string disk_info = 2;
|
|
optional Error error = 3;
|
|
}
|
|
|
|
// lock api have same argument type
|
|
message GenerallyLockRequest {
|
|
string args = 1;
|
|
}
|
|
|
|
message GenerallyLockResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
optional string lock_info = 3; // JSON serialized LockInfo
|
|
}
|
|
|
|
message BatchGenerallyLockRequest {
|
|
repeated string args = 1;
|
|
}
|
|
|
|
message GenerallyLockResult {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
optional string lock_info = 3; // JSON serialized LockInfo
|
|
}
|
|
|
|
message BatchGenerallyLockResponse {
|
|
repeated GenerallyLockResult results = 1;
|
|
}
|
|
|
|
message Mss {
|
|
map<string, string> value = 1;
|
|
}
|
|
|
|
message LocalStorageInfoRequest {
|
|
bool metrics = 1;
|
|
}
|
|
|
|
message LocalStorageInfoResponse {
|
|
bool success = 1;
|
|
bytes storage_info = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message ServerInfoRequest {
|
|
bool metrics = 1;
|
|
}
|
|
|
|
message ServerInfoResponse {
|
|
bool success = 1;
|
|
bytes server_properties = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetCpusRequest {}
|
|
|
|
message GetCpusResponse {
|
|
bool success = 1;
|
|
bytes cpus = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetNetInfoRequest {}
|
|
|
|
message GetNetInfoResponse {
|
|
bool success = 1;
|
|
bytes net_info = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetPartitionsRequest {}
|
|
|
|
message GetPartitionsResponse {
|
|
bool success = 1;
|
|
bytes partitions = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetOsInfoRequest {}
|
|
|
|
message GetOsInfoResponse {
|
|
bool success = 1;
|
|
bytes os_info = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetSELinuxInfoRequest {}
|
|
|
|
message GetSELinuxInfoResponse {
|
|
bool success = 1;
|
|
bytes sys_services = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetSysConfigRequest {}
|
|
|
|
message GetSysConfigResponse {
|
|
bool success = 1;
|
|
bytes sys_config = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetSysErrorsRequest {}
|
|
|
|
message GetSysErrorsResponse {
|
|
bool success = 1;
|
|
bytes sys_errors = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetMemInfoRequest {}
|
|
|
|
message GetMemInfoResponse {
|
|
bool success = 1;
|
|
bytes mem_info = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetMetricsRequest {
|
|
bytes metric_type = 1;
|
|
bytes opts = 2;
|
|
}
|
|
|
|
message GetMetricsResponse {
|
|
bool success = 1;
|
|
bytes realtime_metrics = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetProcInfoRequest {}
|
|
|
|
message GetProcInfoResponse {
|
|
bool success = 1;
|
|
bytes proc_info = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message StartProfilingRequest {
|
|
string profiler = 1;
|
|
}
|
|
|
|
message StartProfilingResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message DownloadProfileDataRequest {}
|
|
|
|
message DownloadProfileDataResponse {
|
|
bool success = 1;
|
|
map<string, bytes> data = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetBucketStatsDataRequest {
|
|
string bucket = 1;
|
|
}
|
|
|
|
message GetBucketStatsDataResponse {
|
|
bool success = 1;
|
|
bytes bucket_stats = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetSRMetricsDataRequest {}
|
|
|
|
message GetSRMetricsDataResponse {
|
|
bool success = 1;
|
|
bytes sr_metrics_summary = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetAllBucketStatsRequest {}
|
|
|
|
message GetAllBucketStatsResponse {
|
|
bool success = 1;
|
|
bytes bucket_stats_map = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message LoadBucketMetadataRequest {
|
|
string bucket = 1;
|
|
}
|
|
|
|
message LoadBucketMetadataResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message DeleteBucketMetadataRequest {
|
|
string bucket = 1;
|
|
}
|
|
|
|
message DeleteBucketMetadataResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message DeletePolicyRequest {
|
|
string policy_name = 1;
|
|
}
|
|
|
|
message DeletePolicyResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message LoadPolicyRequest {
|
|
string policy_name = 1;
|
|
}
|
|
|
|
message LoadPolicyResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message LoadPolicyMappingRequest {
|
|
string user_or_group = 1;
|
|
uint64 user_type = 2;
|
|
bool is_group = 3;
|
|
}
|
|
|
|
message LoadPolicyMappingResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message DeleteUserRequest {
|
|
string access_key = 1;
|
|
}
|
|
|
|
message DeleteUserResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message DeleteServiceAccountRequest {
|
|
string access_key = 1;
|
|
}
|
|
|
|
message DeleteServiceAccountResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message LoadUserRequest {
|
|
string access_key = 1;
|
|
bool temp = 2;
|
|
}
|
|
|
|
message LoadUserResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message LoadServiceAccountRequest {
|
|
string access_key = 1;
|
|
}
|
|
|
|
message LoadServiceAccountResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message LoadGroupRequest {
|
|
string group = 1;
|
|
}
|
|
|
|
message LoadGroupResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message ReloadSiteReplicationConfigRequest {}
|
|
|
|
message ReloadSiteReplicationConfigResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message SignalServiceRequest {
|
|
Mss vars = 1;
|
|
}
|
|
|
|
message SignalServiceResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message BackgroundHealStatusRequest {}
|
|
|
|
message BackgroundHealStatusResponse {
|
|
bool success = 1;
|
|
bytes bg_heal_state = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message GetMetacacheListingRequest {
|
|
bytes opts = 1;
|
|
}
|
|
|
|
message GetMetacacheListingResponse {
|
|
bool success = 1;
|
|
bytes metacache = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message UpdateMetacacheListingRequest {
|
|
bytes metacache = 1;
|
|
}
|
|
|
|
message UpdateMetacacheListingResponse {
|
|
bool success = 1;
|
|
bytes metacache = 2;
|
|
optional string error_info = 3;
|
|
}
|
|
|
|
message ReloadPoolMetaRequest {}
|
|
|
|
message ReloadPoolMetaResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message StopRebalanceRequest {
|
|
string expected_rebalance_id = 1;
|
|
}
|
|
|
|
message StopRebalanceResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message LoadRebalanceMetaRequest {
|
|
bool start_rebalance = 1;
|
|
}
|
|
|
|
message LoadRebalanceMetaResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message StartDecommissionRequest {
|
|
repeated uint32 pool_indices = 1;
|
|
}
|
|
|
|
message StartDecommissionResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message CancelDecommissionRequest {
|
|
uint32 pool_index = 1;
|
|
}
|
|
|
|
message CancelDecommissionResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message ClearDecommissionRequest {
|
|
uint32 pool_index = 1;
|
|
}
|
|
|
|
message ClearDecommissionResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message LoadTransitionTierConfigRequest {}
|
|
|
|
message LoadTransitionTierConfigResponse {
|
|
bool success = 1;
|
|
optional string error_info = 2;
|
|
}
|
|
|
|
message GetLiveEventsRequest {
|
|
uint64 after_sequence = 1;
|
|
uint32 limit = 2;
|
|
}
|
|
|
|
message GetLiveEventsResponse {
|
|
bool success = 1;
|
|
bytes events = 2;
|
|
uint64 next_sequence = 3;
|
|
bool truncated = 4;
|
|
optional string error_info = 5;
|
|
}
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
|
|
service NodeService {
|
|
/* -------------------------------meta service-------------------------- */
|
|
rpc Ping(PingRequest) returns (PingResponse) {};
|
|
rpc HealBucket(HealBucketRequest) returns (HealBucketResponse) {};
|
|
rpc ListBucket(ListBucketRequest) returns (ListBucketResponse) {};
|
|
rpc MakeBucket(MakeBucketRequest) returns (MakeBucketResponse) {};
|
|
rpc GetBucketInfo(GetBucketInfoRequest) returns (GetBucketInfoResponse) {};
|
|
rpc DeleteBucket(DeleteBucketRequest) returns (DeleteBucketResponse) {};
|
|
|
|
/* -------------------------------disk service-------------------------- */
|
|
|
|
rpc ReadAll(ReadAllRequest) returns (ReadAllResponse) {};
|
|
rpc WriteAll(WriteAllRequest) returns (WriteAllResponse) {};
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
|
|
rpc VerifyFile(VerifyFileRequest) returns (VerifyFileResponse) {};
|
|
rpc ReadParts(ReadPartsRequest) returns (ReadPartsResponse) {};
|
|
rpc CheckParts(CheckPartsRequest) returns (CheckPartsResponse) {};
|
|
rpc RenamePart(RenamePartRequest) returns (RenamePartResponse) {};
|
|
rpc RenameFile(RenameFileRequest) returns (RenameFileResponse) {};
|
|
rpc Write(WriteRequest) returns (WriteResponse) {};
|
|
rpc WriteStream(stream WriteRequest) returns (stream WriteResponse) {};
|
|
// rpc Append(AppendRequest) returns (AppendResponse) {};
|
|
rpc ReadAt(stream ReadAtRequest) returns (stream ReadAtResponse) {};
|
|
rpc ListDir(ListDirRequest) returns (ListDirResponse) {};
|
|
rpc WalkDir(WalkDirRequest) returns (stream WalkDirResponse) {};
|
|
rpc RenameData(RenameDataRequest) returns (RenameDataResponse) {};
|
|
rpc MakeVolumes(MakeVolumesRequest) returns (MakeVolumesResponse) {};
|
|
rpc MakeVolume(MakeVolumeRequest) returns (MakeVolumeResponse) {};
|
|
rpc ListVolumes(ListVolumesRequest) returns (ListVolumesResponse) {};
|
|
rpc StatVolume(StatVolumeRequest) returns (StatVolumeResponse) {};
|
|
rpc DeletePaths(DeletePathsRequest) returns (DeletePathsResponse) {};
|
|
rpc UpdateMetadata(UpdateMetadataRequest) returns (UpdateMetadataResponse) {};
|
|
rpc ReadMetadata(ReadMetadataRequest) returns (ReadMetadataResponse) {};
|
|
rpc WriteMetadata(WriteMetadataRequest) returns (WriteMetadataResponse) {};
|
|
rpc ReadVersion(ReadVersionRequest) returns (ReadVersionResponse) {};
|
|
rpc BatchReadVersion(BatchReadVersionRequest) returns (BatchReadVersionResponse) {};
|
|
rpc ReadXL(ReadXLRequest) returns (ReadXLResponse) {};
|
|
rpc DeleteVersion(DeleteVersionRequest) returns (DeleteVersionResponse) {};
|
|
rpc DeleteVersions(DeleteVersionsRequest) returns (DeleteVersionsResponse) {};
|
|
rpc ReadMultiple(ReadMultipleRequest) returns (ReadMultipleResponse) {};
|
|
rpc DeleteVolume(DeleteVolumeRequest) returns (DeleteVolumeResponse) {};
|
|
rpc DiskInfo(DiskInfoRequest) returns (DiskInfoResponse) {};
|
|
|
|
|
|
/* -------------------------------lock service-------------------------- */
|
|
|
|
rpc Lock(GenerallyLockRequest) returns (GenerallyLockResponse) {};
|
|
rpc UnLock(GenerallyLockRequest) returns (GenerallyLockResponse) {};
|
|
rpc ForceUnLock(GenerallyLockRequest) returns (GenerallyLockResponse) {};
|
|
rpc Refresh(GenerallyLockRequest) returns (GenerallyLockResponse) {};
|
|
rpc LockBatch(BatchGenerallyLockRequest) returns (BatchGenerallyLockResponse) {};
|
|
rpc UnLockBatch(BatchGenerallyLockRequest) returns (BatchGenerallyLockResponse) {};
|
|
|
|
/* -------------------------------peer rest service-------------------------- */
|
|
|
|
rpc LocalStorageInfo(LocalStorageInfoRequest) returns (LocalStorageInfoResponse) {};
|
|
rpc ServerInfo(ServerInfoRequest) returns (ServerInfoResponse) {};
|
|
rpc GetCpus(GetCpusRequest) returns (GetCpusResponse) {};
|
|
rpc GetNetInfo(GetNetInfoRequest) returns (GetNetInfoResponse) {};
|
|
rpc GetPartitions(GetPartitionsRequest) returns (GetPartitionsResponse) {};
|
|
rpc GetOsInfo(GetOsInfoRequest) returns (GetOsInfoResponse) {};
|
|
rpc GetSELinuxInfo(GetSELinuxInfoRequest) returns (GetSELinuxInfoResponse) {};
|
|
rpc GetSysConfig(GetSysConfigRequest) returns (GetSysConfigResponse) {};
|
|
rpc GetSysErrors(GetSysErrorsRequest) returns (GetSysErrorsResponse) {};
|
|
rpc GetMemInfo(GetMemInfoRequest) returns (GetMemInfoResponse) {};
|
|
rpc GetMetrics(GetMetricsRequest) returns (GetMetricsResponse) {};
|
|
rpc GetProcInfo(GetProcInfoRequest) returns (GetProcInfoResponse) {};
|
|
rpc StartProfiling(StartProfilingRequest) returns (StartProfilingResponse) {};
|
|
rpc DownloadProfileData(DownloadProfileDataRequest) returns (DownloadProfileDataResponse) {};
|
|
rpc GetBucketStats(GetBucketStatsDataRequest) returns (GetBucketStatsDataResponse) {};
|
|
rpc GetSRMetrics(GetSRMetricsDataRequest) returns (GetSRMetricsDataResponse) {};
|
|
rpc GetAllBucketStats(GetAllBucketStatsRequest) returns (GetAllBucketStatsResponse) {};
|
|
rpc LoadBucketMetadata(LoadBucketMetadataRequest) returns (LoadBucketMetadataResponse) {};
|
|
rpc DeleteBucketMetadata(DeleteBucketMetadataRequest) returns (DeleteBucketMetadataResponse) {};
|
|
rpc DeletePolicy(DeletePolicyRequest) returns (DeletePolicyResponse) {};
|
|
rpc LoadPolicy(LoadPolicyRequest) returns (LoadPolicyResponse) {};
|
|
rpc LoadPolicyMapping(LoadPolicyMappingRequest) returns (LoadPolicyMappingResponse) {};
|
|
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) {};
|
|
rpc DeleteServiceAccount(DeleteServiceAccountRequest) returns (DeleteServiceAccountResponse) {};
|
|
rpc LoadUser(LoadUserRequest) returns (LoadUserResponse) {};
|
|
rpc LoadServiceAccount(LoadServiceAccountRequest) returns (LoadServiceAccountResponse) {};
|
|
rpc LoadGroup(LoadGroupRequest) returns (LoadGroupResponse) {};
|
|
rpc ReloadSiteReplicationConfig(ReloadSiteReplicationConfigRequest) returns (ReloadSiteReplicationConfigResponse) {};
|
|
// rpc VerifyBinary() returns () {};
|
|
// rpc CommitBinary() returns () {};
|
|
rpc SignalService(SignalServiceRequest) returns (SignalServiceResponse) {};
|
|
rpc BackgroundHealStatus(BackgroundHealStatusRequest) returns (BackgroundHealStatusResponse) {};
|
|
rpc GetMetacacheListing(GetMetacacheListingRequest) returns (GetMetacacheListingResponse) {};
|
|
rpc UpdateMetacacheListing(UpdateMetacacheListingRequest) returns (UpdateMetacacheListingResponse) {};
|
|
rpc ReloadPoolMeta(ReloadPoolMetaRequest) returns (ReloadPoolMetaResponse) {};
|
|
rpc StopRebalance(StopRebalanceRequest) returns (StopRebalanceResponse) {};
|
|
rpc LoadRebalanceMeta(LoadRebalanceMetaRequest) returns (LoadRebalanceMetaResponse) {};
|
|
rpc StartDecommission(StartDecommissionRequest) returns (StartDecommissionResponse) {};
|
|
rpc CancelDecommission(CancelDecommissionRequest) returns (CancelDecommissionResponse) {};
|
|
rpc ClearDecommission(ClearDecommissionRequest) returns (ClearDecommissionResponse) {};
|
|
rpc LoadTransitionTierConfig(LoadTransitionTierConfigRequest) returns (LoadTransitionTierConfigResponse) {};
|
|
rpc GetLiveEvents(GetLiveEventsRequest) returns (GetLiveEventsResponse) {};
|
|
}
|