diff --git a/NEWS b/NEWS index 4a3cd0277e9fa6db979bc07d7b44afbdb9546a90..831a465737f3c1e6fa8b62873a7c84dc88ec7e58 100644 --- a/NEWS +++ b/NEWS @@ -213,6 +213,8 @@ documents those changes that are of interest to users and administrators. -- Fix issue with "sreport cluster AccountUtilizationByUser" when using PrivateData=users. -- Fix perlapi tests for libslurm perl module. + -- MySQL - Fix potential issue when PrivateData=Usage and a normal user + runs certain sreport reports. * Changes in Slurm 14.11.3 ========================== diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 68b23ed155e4d2c491d65d3a9eeab9d46dd52c93..6e462decdc450df1c01c78b2f73d00ff086a4c5a 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -1237,8 +1237,6 @@ Unless constrained by the maximum node count, the job will contain The list may be specified as a comma\-separated list of hosts, a range of hosts (host[1\-5,7,...] for example), or a filename. The host list will be assumed to be a filename if it contains a "/" character. -If you specify a maximum node count and the host list contains more nodes, the -extra node names will be silently ignored. If you specify a minimum node or processor count larger than can be satisfied by the supplied host list, additional resources will be allocated on other nodes as needed. diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 03be322216bc693107ffe4708250a0a3bef30444..ce7da5c16f31c70e3c3951b539b5ea8c06cb4ae9 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -1410,8 +1410,6 @@ Unless constrained by the maximum node count, the job will contain The list may be specified as a comma\-separated list of hosts, a range of hosts (host[1\-5,7,...] for example), or a filename. The host list will be assumed to be a filename if it contains a "/" character. -If you specify a maximum node count and the host list contains more nodes, the -extra node names will be silently ignored. If you specify a minimum node or processor count larger than can be satisfied by the supplied host list, additional resources will be allocated on other nodes as needed. diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 91c70d8a405b8ed301761a945047868171e7d5d8..c6af85603262f3211732d5f27abdb8b40b63b3be 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -1721,8 +1721,6 @@ Unless constrained by the maximum node count, the job will contain The list may be specified as a comma\-separated list of hosts, a range of hosts (host[1\-5,7,...] for example), or a filename. The host list will be assumed to be a filename if it contains a "/" character. -If you specify a maximum node count and the host list contains more nodes, the -extra node names will be silently ignored. If you specify a minimum node or processor count larger than can be satisfied by the supplied host list, additional resources will be allocated on other nodes as needed. diff --git a/src/plugins/accounting_storage/mysql/as_mysql_usage.c b/src/plugins/accounting_storage/mysql/as_mysql_usage.c index d2cce85131e7a07b960131403664f6f598e1623c..3cc9511642da71d9cbe53d9cca231ddfc0f45fde 100644 --- a/src/plugins/accounting_storage/mysql/as_mysql_usage.c +++ b/src/plugins/accounting_storage/mysql/as_mysql_usage.c @@ -738,7 +738,6 @@ extern int as_mysql_get_usage(mysql_conn_t *mysql_conn, uid_t uid, char *query = NULL; char *username = NULL; uint16_t private_data = 0; - slurmdb_user_rec_t user; List *my_list; uint32_t id = NO_VAL; char *cluster_name = NULL; @@ -808,17 +807,20 @@ extern int as_mysql_get_usage(mysql_conn_t *mysql_conn, uid_t uid, if (check_connection(mysql_conn) != SLURM_SUCCESS) return ESLURM_DB_CONNECTION; - memset(&user, 0, sizeof(slurmdb_user_rec_t)); - user.uid = uid; - private_data = slurm_get_private_data(); if (private_data & PRIVATE_DATA_USAGE) { if (!(is_admin = is_user_min_admin_level( mysql_conn, uid, SLURMDB_ADMIN_OPERATOR))) { ListIterator itr = NULL; slurmdb_coord_rec_t *coord = NULL; + slurmdb_user_rec_t user; + bool is_coord; + + memset(&user, 0, sizeof(slurmdb_user_rec_t)); + user.uid = uid; + is_coord = is_user_any_coord(mysql_conn, &user); - if (username && !strcmp(slurmdb_assoc->user, user.name)) + if (username && !strcmp(username, user.name)) goto is_user; if (type != DBD_GET_ASSOC_USAGE) @@ -830,7 +832,7 @@ extern int as_mysql_get_usage(mysql_conn_t *mysql_conn, uid_t uid, goto bad_user; } - if (!is_user_any_coord(mysql_conn, &user)) { + if (!is_coord) { debug4("This user is not a coordinator."); goto bad_user; }