2021-10-04 11:29:21 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2024-10-08 14:30:50 +00:00
|
|
|
package frost.fs.status;
|
2021-10-04 11:29:21 +00:00
|
|
|
|
2024-09-05 13:24:35 +00:00
|
|
|
// Declares the general format of the status returns of the FrostFS RPC
|
|
|
|
// protocol. Status is present in all response messages. Each RPC of FrostFS
|
|
|
|
// protocol describes the possible outcomes and details of the operation.
|
2021-11-12 16:10:39 +00:00
|
|
|
//
|
|
|
|
// Each status is assigned a one-to-one numeric code. Any unique result of an
|
2024-09-05 13:24:35 +00:00
|
|
|
// operation in FrostFS is unambiguously associated with the code value.
|
2021-11-12 16:10:39 +00:00
|
|
|
//
|
|
|
|
// Numerical set of codes is split into 1024-element sections. An enumeration
|
|
|
|
// is defined for each section. Values can be referred to in the following ways:
|
|
|
|
//
|
|
|
|
// * numerical value ranging from 0 to 4,294,967,295 (global code);
|
|
|
|
//
|
|
|
|
// * values from enumeration (local code). The formula for the ratio of the
|
|
|
|
// local code (`L`) of a defined section (`S`) to the global one (`G`):
|
|
|
|
// `G = 1024 * S + L`.
|
|
|
|
//
|
|
|
|
// All outcomes are divided into successful and failed, which corresponds
|
|
|
|
// to the success or failure of the operation. The definition of success
|
2022-04-13 06:21:33 +00:00
|
|
|
// follows the semantics of RPC and the description of its purpose.
|
|
|
|
// The server must not attach code that is the opposite of the outcome type.
|
2021-11-12 16:10:39 +00:00
|
|
|
//
|
|
|
|
// See the set of return codes in the description for calls.
|
|
|
|
//
|
2022-04-13 06:21:33 +00:00
|
|
|
// Each status can carry a developer-facing error message. It should be a human
|
2021-11-12 16:10:39 +00:00
|
|
|
// readable text in English. The server should not transmit (and the client
|
|
|
|
// should not expect) useful information in the message. Field `details`
|
|
|
|
// should make the return more detailed.
|
2021-10-04 11:29:21 +00:00
|
|
|
message Status {
|
2024-02-28 15:53:04 +00:00
|
|
|
// The status code
|
|
|
|
uint32 code = 1;
|
|
|
|
|
|
|
|
// Developer-facing error message
|
|
|
|
string message = 2;
|
|
|
|
|
|
|
|
// Return detail. It contains additional information that can be used to
|
|
|
|
// analyze the response. Each code defines a set of details that can be
|
|
|
|
// attached to a status. Client should not handle details that are not
|
|
|
|
// covered by the code.
|
|
|
|
message Detail {
|
|
|
|
// Detail ID. The identifier is required to determine the binary format
|
|
|
|
// of the detail and how to decode it.
|
|
|
|
uint32 id = 1;
|
|
|
|
|
|
|
|
// Binary status detail. Must follow the format associated with ID.
|
|
|
|
// The possibility of missing a value must be explicitly allowed.
|
|
|
|
bytes value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Data detailing the outcome of the operation. Must be unique by ID.
|
|
|
|
repeated Detail details = 3;
|
2021-10-04 11:29:21 +00:00
|
|
|
}
|
2021-10-04 11:40:56 +00:00
|
|
|
|
2021-11-12 16:10:39 +00:00
|
|
|
// Section identifiers.
|
|
|
|
enum Section {
|
2024-02-28 15:53:04 +00:00
|
|
|
// Successful return codes.
|
|
|
|
SECTION_SUCCESS = 0;
|
2021-11-12 16:10:39 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Failure codes regardless of the operation.
|
|
|
|
SECTION_FAILURE_COMMON = 1;
|
2022-02-09 10:35:24 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Object service-specific errors.
|
|
|
|
SECTION_OBJECT = 2;
|
2022-02-09 10:36:32 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Container service-specific errors.
|
|
|
|
SECTION_CONTAINER = 3;
|
2022-02-09 10:39:38 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Session service-specific errors.
|
|
|
|
SECTION_SESSION = 4;
|
2024-04-23 19:18:22 +00:00
|
|
|
|
|
|
|
// Session service-specific errors.
|
|
|
|
SECTION_APE_MANAGER = 5;
|
2021-11-12 16:10:39 +00:00
|
|
|
}
|
|
|
|
|
2024-09-05 13:24:35 +00:00
|
|
|
// Section of FrostFS successful return codes.
|
2021-10-04 11:40:56 +00:00
|
|
|
enum Success {
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**0**] Default success. Not detailed.
|
|
|
|
// If the server cannot match successful outcome to the code, it should
|
|
|
|
// use this code.
|
|
|
|
OK = 0;
|
2021-10-04 11:40:56 +00:00
|
|
|
}
|
2021-10-04 11:41:31 +00:00
|
|
|
|
2021-11-12 16:10:39 +00:00
|
|
|
// Section of failed statuses independent of the operation.
|
2021-10-04 11:41:31 +00:00
|
|
|
enum CommonFail {
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**1024**] Internal server error, default failure. Not detailed.
|
|
|
|
// If the server cannot match failed outcome to the code, it should
|
|
|
|
// use this code.
|
|
|
|
INTERNAL = 0;
|
|
|
|
|
2024-09-05 13:24:35 +00:00
|
|
|
// [**1025**] Wrong magic of the FrostFS network.
|
2024-02-28 15:53:04 +00:00
|
|
|
// Details:
|
2024-09-05 13:24:35 +00:00
|
|
|
// - [**0**] Magic number of the served FrostFS network (big-endian 64-bit
|
2024-02-28 15:53:04 +00:00
|
|
|
// unsigned integer).
|
|
|
|
WRONG_MAGIC_NUMBER = 1;
|
|
|
|
|
|
|
|
// [**1026**] Signature verification failure.
|
|
|
|
SIGNATURE_VERIFICATION_FAIL = 2;
|
|
|
|
|
|
|
|
// [**1027**] Node is under maintenance.
|
|
|
|
NODE_UNDER_MAINTENANCE = 3;
|
2024-05-13 13:48:05 +00:00
|
|
|
|
|
|
|
// [**1028**] Invalid argument error. If the server fails on validation of a
|
2024-07-25 15:19:02 +00:00
|
|
|
// request parameter as the client sent it incorrectly, then this code should
|
|
|
|
// be used.
|
2024-05-13 13:48:05 +00:00
|
|
|
INVALID_ARGUMENT = 4;
|
2021-10-04 11:41:31 +00:00
|
|
|
}
|
2022-02-09 10:35:24 +00:00
|
|
|
|
|
|
|
// Section of statuses for object-related operations.
|
|
|
|
enum Object {
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**2048**] Access denied by ACL.
|
|
|
|
// Details:
|
|
|
|
// - [**0**] Human-readable description (UTF-8 encoded string).
|
|
|
|
ACCESS_DENIED = 0;
|
2022-02-15 20:02:18 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**2049**] Object not found.
|
|
|
|
OBJECT_NOT_FOUND = 1;
|
2022-02-15 20:02:18 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**2050**] Operation rejected by the object lock.
|
|
|
|
LOCKED = 2;
|
2022-02-15 20:02:18 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**2051**] Locking an object with a non-REGULAR type rejected.
|
|
|
|
LOCK_NON_REGULAR_OBJECT = 3;
|
2022-02-21 15:58:34 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**2052**] Object has been marked deleted.
|
|
|
|
OBJECT_ALREADY_REMOVED = 4;
|
2022-03-18 14:49:45 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**2053**] Invalid range has been requested for an object.
|
|
|
|
OUT_OF_RANGE = 5;
|
2022-02-09 10:35:42 +00:00
|
|
|
}
|
2022-02-09 10:36:32 +00:00
|
|
|
|
|
|
|
// Section of statuses for container-related operations.
|
|
|
|
enum Container {
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**3072**] Container not found.
|
|
|
|
CONTAINER_NOT_FOUND = 0;
|
2022-07-29 17:16:16 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**3073**] eACL table not found.
|
|
|
|
EACL_NOT_FOUND = 1;
|
2024-03-05 09:36:58 +00:00
|
|
|
|
|
|
|
// [**3074**] Container access denied.
|
|
|
|
CONTAINER_ACCESS_DENIED = 2;
|
2022-02-09 10:39:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Section of statuses for session-related operations.
|
|
|
|
enum Session {
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**4096**] Token not found.
|
|
|
|
TOKEN_NOT_FOUND = 0;
|
2022-02-15 20:02:18 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// [**4097**] Token has expired.
|
|
|
|
TOKEN_EXPIRED = 1;
|
2022-02-09 10:39:38 +00:00
|
|
|
}
|
2024-04-23 19:18:22 +00:00
|
|
|
|
|
|
|
// Section of status for APE manager related operations.
|
|
|
|
enum APEManager {
|
|
|
|
// [**5120**] The operation is denied by APE manager.
|
|
|
|
APE_MANAGER_ACCESS_DENIED = 0;
|
2024-09-02 12:03:58 +00:00
|
|
|
}
|