From 3e0b50f284c5f86e2901ce9240a4a893f85d843c Mon Sep 17 00:00:00 2001 From: qinguangrui <283713406@qq.com> Date: Thu, 13 Feb 2025 17:23:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=8F=AF=E8=BF=81=E7=A7=BB=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- protos/config.proto | 2 ++ protos/node.proto | 49 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 protos/node.proto diff --git a/.gitignore b/.gitignore index b512c09..34977ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +.idea \ No newline at end of file diff --git a/protos/config.proto b/protos/config.proto index 135832f..30cc1b3 100644 --- a/protos/config.proto +++ b/protos/config.proto @@ -124,6 +124,8 @@ message NodeInfo { uint32 gpu_count = 10; uint32 alloc_gpu_count = 11; uint32 idle_gpu_count = 12; + // node migration flag + bool removable = 13; } message GetClusterNodesInfoRequest { diff --git a/protos/node.proto b/protos/node.proto new file mode 100644 index 0000000..880c03b --- /dev/null +++ b/protos/node.proto @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2022 Peking University and Peking University Institute for Computing and Digital Economy + * SCOW is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. +*/ + +syntax = "proto3"; + +package scow.scheduler_adapter; + +message RemoveNodeFromClusterRequest { + string node_name = 1; +} + +message RemoveNodeFromClusterResponse { + +} + +message AddNodeToClusterRequest { + string node_name = 1; + repeated string partitions = 3; +} + +message AddNodeToClusterResponse { + +} + +service NodeService { + /* + * description: migrate node, remove node from origin cluster + * errors: + * - node not found + * NOT_FOUND, NODE_NOT_FOUND, {} + */ + rpc RemoveNodeFromCluster(RemoveNodeFromClusterRequest) returns (RemoveNodeFromClusterResponse); + /* + * description: migrate node, add node to destination cluster + * errors: + * - node not found + * NOT_FOUND, NODE_NOT_FOUND, {} + */ + rpc AddNodeToCluster(AddNodeToClusterRequest) returns (AddNodeToClusterResponse); +} \ No newline at end of file