diff --git a/NEWS b/NEWS index ff2d4891a8cc18e4faa32131902a5ee1dabf24ff..c85287c03872942460133f97fd859336eb8abab7 100644 --- a/NEWS +++ b/NEWS @@ -200,6 +200,7 @@ documents those changes that are of interest to users and admins. reservations (one with a flag of "Maintenance"). -- Fix bug when updating a pending job's nice value after explicitly setting it's priority. + -- We no longer add blank QOS' * Changes in SLURM 2.0.4 ======================== diff --git a/src/common/slurm_accounting_storage.c b/src/common/slurm_accounting_storage.c index 22287e56d54119ff06f16db7ff0acd1f384f07ce..1321ac61976d91597dfca32e41f2e316d47ad24b 100644 --- a/src/common/slurm_accounting_storage.c +++ b/src/common/slurm_accounting_storage.c @@ -7059,7 +7059,7 @@ extern char *acct_qos_str(List qos_list, uint32_t level) return NULL; } else if(!level) { debug2("no level"); - return "None"; + return ""; } itr = list_iterator_create(qos_list); diff --git a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c index afff3df0fa5e4e6a19fb2b43044425c33d8eea74..3e5c199d6f80c17f62f983f2fa27f49cdcfee758 100644 --- a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c +++ b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c @@ -665,6 +665,9 @@ static int _setup_association_limits(acct_association_rec_t *assoc, list_iterator_create(assoc->qos_list); while((tmp_char = list_next(qos_itr))) { + /* we don't want to include blank names */ + if(!tmp_char[0]) + continue; if(!set) { if(tmp_char[0] == '+' || tmp_char[0] == '-') qos_type = "delta_qos"; @@ -674,11 +677,12 @@ static int _setup_association_limits(acct_association_rec_t *assoc, } list_iterator_destroy(qos_itr); - - xstrfmtcat(*cols, ", %s", qos_type); - xstrfmtcat(*vals, ", '%s'", qos_val); - xstrfmtcat(*extra, ", %s=\"%s\"", qos_type, qos_val); - xfree(qos_val); + if(qos_val) { + xstrfmtcat(*cols, ", %s", qos_type); + xstrfmtcat(*vals, ", '%s'", qos_val); + xstrfmtcat(*extra, ", %s=\"%s\"", qos_type, qos_val); + xfree(qos_val); + } } else if((qos_level == QOS_LEVEL_SET) && default_qos_str) { /* Add default qos to the account */ xstrcat(*cols, ", qos"); diff --git a/src/plugins/accounting_storage/mysql/mysql_rollup.c b/src/plugins/accounting_storage/mysql/mysql_rollup.c index 755c9b0489b63e4032875f8083214f1f5e1b4999..09e13b04fff223f800e22629b6c847586d7cf525 100644 --- a/src/plugins/accounting_storage/mysql/mysql_rollup.c +++ b/src/plugins/accounting_storage/mysql/mysql_rollup.c @@ -374,6 +374,17 @@ extern int mysql_hourly_rollup(mysql_conn_t *mysql_conn, } xfree(query); + /* If a reservation overlaps another reservation we + total up everything here as if they didn't but when + calculating the total time for a cluster we will + remove the extra time received. This may result in + unexpected results with association based reports + since the association is given the total amount of + time of each reservation, thus equaling more time + that is available. Job/Cluster/Reservation reports + should be fine though since we really don't over + allocate resources. + */ while((row = mysql_fetch_row(result))) { int row_start = atoi(row[RESV_REQ_START]); int row_end = atoi(row[RESV_REQ_END]); @@ -945,6 +956,7 @@ extern int mysql_hourly_rollup(mysql_conn_t *mysql_conn, list_flush(assoc_usage_list); list_flush(cluster_usage_list); list_flush(wckey_usage_list); + list_flush(resv_usage_list); curr_start = curr_end; curr_end = curr_start + add_sec; } diff --git a/src/sacctmgr/sacctmgr.c b/src/sacctmgr/sacctmgr.c index d7ed1517e5781f6a5fd4f26c6521db5e9cfbd05c..b42016e46c61e1b194c79664fc17eed7472271f9 100644 --- a/src/sacctmgr/sacctmgr.c +++ b/src/sacctmgr/sacctmgr.c @@ -823,10 +823,12 @@ sacctmgr [<OPTION>] [<COMMAND>] \n\ list cluster - Format=, Names=, WOLimits \n\ add cluster - Fairshare=, GrpCPUs=, GrpJobs=, \n\ GrpNodes=, GrpSubmitJob=, MaxCPUMins= \n\ - MaxJobs=, MaxNodes=, MaxWall=, and Name= \n\ + MaxJobs=, MaxNodes=, MaxWall=, Name=, \n\ + and QosLevel= \n\ modify cluster - (set options) Fairshare=, \n\ GrpCPUs=, GrpJobs=, GrpNodes=, GrpSubmitJob=, \n\ - MaxCPUMins=, MaxJobs=, MaxNodes=, and MaxWall= \n\ + MaxCPUMins=, MaxJobs=, MaxNodes=, MaxWall=, \n\ + and QosLevel= \n\ (where options) Names= \n\ delete cluster - Names= \n\ \n\