Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specific reasons for failed task submission #375

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions protos/Crane.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ message SubmitBatchTaskReply {
bool ok = 1;
oneof payload{
uint32 task_id = 2;
string reason = 3;
ErrCode reason = 3;
}
}

Expand All @@ -72,7 +72,7 @@ message SubmitBatchTasksRequest {

message SubmitBatchTasksReply {
repeated uint32 task_id_list = 1;
repeated string reason_list = 2;
repeated ErrCode reason_list = 2;
}

message ExecuteTasksRequest {
Expand Down
130 changes: 71 additions & 59 deletions protos/PublicDefs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -320,65 +320,77 @@ message TrimmedPartitionInfo {
enum ErrCode {
SUCCESS = 0; // Success

ERR_INVALID_UID = 10001; // Invalid UID passed
ERR_INVALID_OP_USER = 10002; // Invalid operation user
ERR_INVALID_USER = 10003; // Invalid user
ERR_PERMISSION_USER = 10004; // User permissions too low, no permission to operate
ERR_USER_DUPLICATE_ACCOUNT = 10005; // User duplicate account insertion
ERR_USER_ALLOWED_ACCOUNT = 10006; // User does not have permission for the account
ERR_INVALID_ADMIN_LEVEL = 10007; // Invalid permission level
ERR_USER_ACCOUNT_MISMATCH = 10008; // User does not belong to the account
ERR_NO_ACCOUNT_SPECIFIED = 10009;

ERR_INVALID_ACCOUNT = 10010; // Invalid account
ERR_DUPLICATE_ACCOUNT = 10011; // Duplicate account insertion
ERR_INVALID_PARENTACCOUNT = 10012; // Invalid parent account
ERR_DELETE_ACCOUNT = 10013; // Account has child nodes

ERR_INVALID_PARTITION = 10014; // Invalid partition, partition does not exist
ERR_ALLOWED_PARTITION = 10015; // Account/user does not include this partition
ERR_DUPLICATE_PARTITION = 10016; // Account/user duplicate insertion
ERR_PARENT_ALLOWED_PARTITION = 10017; // Parent account does not include this partition
ERR_USER_EMPTY_PARTITION = 10018; // Cannot add QoS when user has no partition
ERR_CHILD_HAS_PARTITION = 10019; // Partition '{}' is used by some descendant node of the account '{}'. Ignoring this constraint with forced operation.

ERR_INVALID_QOS = 10020; // Invalid QoS, QoS does not exist
ERR_DB_DUPLICATE_QOS = 10021; // Duplicate QoS insertion in the database.
ERR_DELETE_QOS = 10022; // QoS reference count is not zero.
ERR_CONVERT_TO_INTERGER = 10023; // String to integer conversion failed
ERR_TIME_LIMIT = 10024; // Invalid time value
ERR_ALLOWED_QOS = 10025; // Account/user does not include this QoS.
ERR_DUPLICATE_QOS = 10026; // Account/user duplicate insertion.
ERR_PARENT_ALLOWED_QOS = 10027; // Parent account does not include this QoS.
ERR_SET_ALLOWED_QOS = 10028; // QoS '{}' is the default QoS of partition '{}', but not found in the new QoS list.
ERR_ALLOWED_DEFAULT_QOS = 10029; // Default QoS is not in the allowed QoS list
ERR_DUPLICATE_DEFAULT_QOS = 10030; // Duplicate default QoS setting
ERR_CHILD_HAS_DEFAULT_QOS = 10031; // Someone is using QoS '{}' as default QoS. Ignoring this constraint with forced deletion, the deleted default QoS is randomly replaced with one of the remaining items in the QoS list.
ERR_SET_ACCOUNT_QOS = 10032; // QoS '{}' is used by some descendant node or itself of the account '{}'. Ignoring this constraint with forced operation.
ERR_SET_DEFAULT_QOS = 10033; // Qos '{}' not in allowed qos list or is already the default qos
ERR_IS_DEFAULT_QOS = 10034;

ERR_UPDATE_DATABASE = 10035; // Database update failed

ERR_GENERIC_FAILURE = 10100;
ERR_NO_RESOURCE = 10101;
ERR_NON_EXISTENT = 10102;
ERR_INVALID_NODE_NUM = 10103;
ERR_SYSTEM_ERR = 10104;
ERR_EXISTING_TASK = 10105;
ERR_INVALID_PARAM = 10106;
ERR_STOP = 10107;
ERR_PERMISSION_DENIED = 10108;
ERR_CONNECTION_TIMEOUT = 10109;
ERR_CONNECTION_ABORTED = 10110;
ERR_RPC_FAILURE = 10111;
ERR_TOKEN_REQUEST_FAILURE = 10112;
ERR_STREAM_BROKEN = 10113;
ERR_INVALID_STUB = 10114;
ERR_CGROUP = 10115;
ERR_PROTOBUF = 10116;
ERR_LIB_EVENT = 10117;
ERR_NO_AVAIL_NODE = 10118;
ERR_INVALID_UID = 1; // Invalid UID passed
ERR_INVALID_OP_USER = 2; // Invalid operation user
ERR_INVALID_USER = 3; // Invalid user
ERR_PERMISSION_USER = 4; // User permissions too low, no permission to operate
ERR_BLOCKED_USER = 5;
ERR_USER_DUPLICATE_ACCOUNT= 6; // User duplicate account insertion
ERR_USER_ALLOWED_ACCOUNT = 7; // User does not have permission for the account
ERR_INVALID_ADMIN_LEVEL = 8; // Invalid permission level
ERR_USER_ACCOUNT_MISMATCH = 9; // User does not belong to the account
ERR_NO_ACCOUNT_SPECIFIED = 10;

ERR_INVALID_ACCOUNT = 11; // Invalid account
ERR_DUPLICATE_ACCOUNT = 12; // Duplicate account insertion
ERR_INVALID_PARENTACCOUNT = 13; // Invalid parent account
ERR_DELETE_ACCOUNT = 14; // Account has child nodes
ERR_BLOCKED_ACCOUNT = 15;

ERR_INVALID_PARTITION = 16; // Invalid partition, partition does not exist
ERR_ALLOWED_PARTITION = 17; // Account/user does not include this partition
ERR_DUPLICATE_PARTITION = 18; // Account/user duplicate insertion
ERR_PARENT_ALLOWED_PARTITION = 19; // Parent account does not include this partition
ERR_USER_EMPTY_PARTITION = 20; // Cannot add QoS when user has no partition
ERR_CHILD_HAS_PARTITION = 21; // Partition '{}' is used by some descendant node of the account '{}'. Ignoring this constraint with forced operation.
ERR_HAS_NO_QOS_IN_PARTITION = 22;
ERR_HAS_ALLOWED_QOS_IN_PARTITION = 23;

ERR_INVALID_QOS = 24; // Invalid QoS, QoS does not exist
ERR_DB_DUPLICATE_QOS = 25; // Duplicate QoS insertion in the database.
ERR_DELETE_QOS = 26; // QoS reference count is not zero.
ERR_CONVERT_TO_INTERGER = 27; // String to integer conversion failed
ERR_TIME_LIMIT = 28; // Invalid time value
ERR_ALLOWED_QOS = 29; // Account/user does not include this QoS.
ERR_DUPLICATE_QOS = 30; // Account/user duplicate insertion.
ERR_PARENT_ALLOWED_QOS = 31; // Parent account does not include this QoS.
ERR_SET_ALLOWED_QOS = 32; // QoS '{}' is the default QoS of partition '{}', but not found in the new QoS list.
ERR_ALLOWED_DEFAULT_QOS = 33; // Default QoS is not in the allowed QoS list
ERR_DUPLICATE_DEFAULT_QOS = 34; // Duplicate default QoS setting
ERR_CHILD_HAS_DEFAULT_QOS = 35; // Someone is using QoS '{}' as default QoS. Ignoring this constraint with forced deletion, the deleted default QoS is randomly replaced with one of the remaining items in the QoS list.
ERR_SET_ACCOUNT_QOS = 36; // QoS '{}' is used by some descendant node or itself of the account '{}'. Ignoring this constraint with forced operation.
ERR_SET_DEFAULT_QOS = 37; // Qos '{}' not in allowed qos list or is already the default qos
ERR_IS_DEFAULT_QOS = 38;

ERR_UPDATE_DATABASE = 39; // Database update failed

ERR_GENERIC_FAILURE = 40;
ERR_NO_RESOURCE = 41;
ERR_NON_EXISTENT = 42;
ERR_INVALID_NODE_NUM = 43;
ERR_INVAILD_NODE_LIST = 44;
ERR_INVAILD_EX_NODE_LIST = 45;
ERR_TIME_TIMIT_BEYOND = 46;
ERR_CPUS_PER_TASK_BEYOND = 47;
ERR_NO_ENOUGH_NODE = 48;

ERR_SYSTEM_ERR = 49;
ERR_EXISTING_TASK = 50;
ERR_BEYOND_TASK_ID = 51;
ERR_INVALID_PARAM = 52;
ERR_STOP = 53;
ERR_PERMISSION_DENIED = 54;
ERR_CONNECTION_TIMEOUT = 55;
ERR_CONNECTION_ABORTED = 56;
ERR_RPC_FAILURE = 57;
ERR_TOKEN_REQUEST_FAILURE = 58;
ERR_STREAM_BROKEN = 59;
ERR_INVALID_STUB = 60;
ERR_CGROUP = 61;
ERR_PROTOBUF = 62;
ERR_LIB_EVENT = 63;
ERR_NO_AVAIL_NODE = 64;
ERR_CODE_COUNT = 65;
}

enum EntityType {
Expand Down
Loading
Loading