Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
1daidai1 committed Feb 21, 2025
1 parent 8eae9d4 commit e9fa4fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/CraneCtld/AccountManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ CraneExpected<void> AccountManager::CheckAndApplyQosLimitOnTask(

const User* user_share_ptr = GetExistedUserInfoNoLock_(user);
if (!user_share_ptr) {
CRANE_ERROR("Unknown user {} in user list", user);
CRANE_ERROR("The current user {} is not in the user list when submitting a task", user);
return std::unexpected(CraneErrCode::ERR_INVALID_OP_USER);
}

Expand All @@ -962,8 +962,8 @@ CraneExpected<void> AccountManager::CheckAndApplyQosLimitOnTask(
.allowed_partition_qos_map.find(task->partition_id);
if (partition_it == user_share_ptr->account_to_attrs_map.at(account)
.allowed_partition_qos_map.end()) {

CRANE_ERROR("Partition is not allowed for this user {}", user);
CRANE_ERROR("This user {} does not have partition {} permission when submitting a task",
user, task->partition_id);
return std::unexpected(CraneErrCode::ERR_ALLOWED_PARTITION);
}
if (task->qos.empty()) {
Expand All @@ -979,7 +979,7 @@ CraneExpected<void> AccountManager::CheckAndApplyQosLimitOnTask(
// Check whether task.qos in the qos list
if (!ranges::contains(partition_it->second.second, task->qos)) {
CRANE_ERROR(
"The qos '{}' set is not in partition's allowed qos list",
"The set qos '{}' is not in partition's allowed qos list when submitting a task",
task->qos);
return std::unexpected(CraneErrCode::ERR_HAS_ALLOWED_QOS_IN_PARTITION);
}
Expand Down
2 changes: 1 addition & 1 deletion src/CraneCtld/CtldGrpcServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ CtldServer::SubmitTaskToScheduler(std::unique_ptr<TaskInCtld> task) {
task->MutableTaskToCtld()->set_account(user_scoped_ptr->default_account);
} else {
if (!user_scoped_ptr->account_to_attrs_map.contains(task->account)) {
CRANE_ERROR("Account '{}' is not in account list", task->account);
CRANE_ERROR("Account '{}' is not in the user account list when submitting the task", task->account);
return std::unexpected(CraneErrCode::ERR_USER_ACCOUNT_MISMATCH);
}
}
Expand Down

0 comments on commit e9fa4fb

Please sign in to comment.