Skip to content
Snippets Groups Projects
Commit 865df4ad authored by Danny Auble's avatar Danny Auble
Browse files

setup sacctmgr and slurmdbd for show problems

parent a7216ae3
No related branches found
No related tags found
No related merge requests found
......@@ -608,7 +608,7 @@ static void _show_it (int argc, char *argv[])
} else if (strncasecmp (argv[0], "Configuration",
MAX(command_len, 1)) == 0) {
error_code = sacctmgr_list_config(true);
} else if (strncasecmp (argv[0], "Problem",
} else if (strncasecmp (argv[0], "Problems",
MAX(command_len, 1)) == 0) {
error_code = sacctmgr_list_problem((argc - 1), &argv[1]);
} else if (strncasecmp (argv[0], "QOS", MAX(command_len, 1)) == 0) {
......@@ -625,9 +625,10 @@ static void _show_it (int argc, char *argv[])
exit_code = 1;
fprintf(stderr, "No valid entity in list command\n");
fprintf(stderr, "Input line must include ");
fprintf(stderr, "\"Account\", \"Association\", ");
fprintf(stderr, "\"Cluster\", \"Problem\", \"QOS\", ");
fprintf(stderr, "\"Transaction\", \"User\", or \"WCKey\"\n");
fprintf(stderr, "\"Account\", \"Association\", "
"\"Configuration\"\n\"Cluster\", \"Problem\", "
"\"QOS\", \"Transaction\", \"User\", "
"or \"WCKey\"\n");
}
if (error_code == SLURM_ERROR) {
......
......@@ -1236,6 +1236,19 @@ static int _get_probs(slurmdbd_conn_t *slurmdbd_conn,
char *comment = NULL;
debug2("DBD_GET_PROBS: called");
if((*uid != slurmdbd_conf->slurm_user_id && *uid != 0)
&& assoc_mgr_get_admin_level(slurmdbd_conn->db_conn, *uid)
< ACCT_ADMIN_OPERATOR) {
comment = "Your user doesn't have privilege to preform this action";
error("%s", comment);
*out_buffer = make_dbd_rc_msg(slurmdbd_conn->rpc_version,
ESLURM_ACCESS_DENIED,
comment, DBD_GET_PROBS);
return ESLURM_ACCESS_DENIED;
}
if (slurmdbd_unpack_cond_msg(slurmdbd_conn->rpc_version,
DBD_GET_PROBS, &get_msg, in_buffer) !=
SLURM_SUCCESS) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment