diff --git a/NEWS b/NEWS index b8cf51398cafa83249129b088058c9f12ce619e1..32b83bb01a899c2a8271092116b2ab7b7b2df1a0 100644 --- a/NEWS +++ b/NEWS @@ -112,6 +112,10 @@ documents those changes that are of interest to users and admins. -- Fixed race condition when using the DBD in accounting where if a job wasn't started at the time the eligible message was sent but started before the db_index was returned information like start time would be lost. + -- Fix issue in accounting where normalized shares could be updated + incorrectly when getting fairshare from the parent. + -- Fixed if not enforcing associations but want QOS support for a default + qos on the cluster to fill that in correctly. * Changes in SLURM 2.3.1 ======================== diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c index 7b8109a550a1eb1b0190687087ca4f9b6d15a16b..7350a2703775a3ed5bd34fa790ea90d0ba8319de 100644 --- a/src/common/assoc_mgr.c +++ b/src/common/assoc_mgr.c @@ -2539,8 +2539,11 @@ extern int assoc_mgr_update_assocs(slurmdb_update_object_t *update) goto is_user; itr2 = list_iterator_create( object->usage->childern_list); - while ((rec = list_next(itr2))) - count += rec->shares_raw; + while ((rec = list_next(itr2))) { + if (rec->shares_raw + != SLURMDB_FS_USE_PARENT) + count += rec->shares_raw; + } list_iterator_reset(itr2); while ((rec = list_next(itr2))) rec->usage->level_shares = count; diff --git a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c index 0505dc5811563e2119d0b06bfb7e4b11e31c2e46..a304d4725f899db04c6882a9d7364cc5addf8946 100644 --- a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c +++ b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c @@ -202,6 +202,9 @@ static void *_set_db_inx_thread(void *no_data) { struct job_record *job_ptr = NULL; ListIterator itr; + /* Read lock on jobs */ + slurmctld_lock_t job_read_lock = + { NO_LOCK, READ_LOCK, NO_LOCK, NO_LOCK }; /* Write lock on jobs */ slurmctld_lock_t job_write_lock = { NO_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK }; @@ -227,8 +230,12 @@ static void *_set_db_inx_thread(void *no_data) * is can make submitting jobs much * faster and not lock up the * controller waiting for the db inx - * back from the database. */ - lock_slurmctld(job_write_lock); + * back from the database. + * Even though there is potential of modifying the + * job db_index here we use a read lock since the + * data isn't that sensitive and will only be updated + * later in this function. */ + lock_slurmctld(job_read_lock); itr = list_iterator_create(job_list); while ((job_ptr = list_next(itr))) { if (!job_ptr->db_index) { @@ -268,7 +275,7 @@ static void *_set_db_inx_thread(void *no_data) } } list_iterator_destroy(itr); - unlock_slurmctld(job_write_lock); + unlock_slurmctld(job_read_lock); if (local_job_list) { slurmdbd_msg_t req, resp; diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index c3c21c5b05d591337362d0af08a830419f4bc829..0e026e3d4c2556ce816dd46ae463915e66960238 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -364,12 +364,18 @@ static slurmdb_qos_rec_t *_determine_and_validate_qos( if (assoc_ptr->def_qos_id) qos_rec->id = assoc_ptr->def_qos_id; else if (bit_set_count(assoc_ptr->usage->valid_qos) - == 1) { + == 1) qos_rec->id = bit_ffs(assoc_ptr->usage->valid_qos); - } else + else if (assoc_mgr_root_assoc + && assoc_mgr_root_assoc->def_qos_id) + qos_rec->id = assoc_mgr_root_assoc->def_qos_id; + else qos_rec->name = "normal"; - } else + } else if (assoc_mgr_root_assoc + && assoc_mgr_root_assoc->def_qos_id) + qos_rec->id = assoc_mgr_root_assoc->def_qos_id; + else qos_rec->name = "normal"; }