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

feat: 增加节点可迁移的接口 #45

Open
wants to merge 1 commit 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.idea
2 changes: 2 additions & 0 deletions protos/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
49 changes: 49 additions & 0 deletions protos/node.proto
Original file line number Diff line number Diff line change
@@ -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);
}