Skip to content

Commit

Permalink
add submittask fail reason
Browse files Browse the repository at this point in the history
  • Loading branch information
1daidai1 committed Nov 26, 2024
1 parent a31b5d6 commit 1970f99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/CraneCtld/CtldGrpcServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,8 @@ CtldServer::SubmitTaskToScheduler(std::unique_ptr<TaskInCtld> task) {
return result::fail( result.reason);
}

std::string errorMessage = std::string(CraneErrStr(result.err)) + ": " + result.reason;
return result::fail(errorMessage.c_str());
std::string error_message = std::string(CraneErrStr(result.err)) + ": " + result.reason;
return result::fail(error_message.c_str());
}

} // namespace Ctld
2 changes: 1 addition & 1 deletion src/CraneCtld/TaskScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2804,7 +2804,7 @@ Result TaskScheduler::CheckTaskValidity(TaskInCtld* task) {
// Since we do not access the elements in partition_metas_m

// Check whether the selected partition is able to run this task.
if (!(task->requested_node_res_view * task->node_num <=
if (!(task->requested_node_res_view * task->node_num <=
metas_ptr->partition_global_meta.res_total_inc_dead)) {
CRANE_TRACE(
"Resource not enough for task #{}. "
Expand Down

0 comments on commit 1970f99

Please sign in to comment.