diff --git a/NEWS b/NEWS index fad593cca4cc868dd24c12c008b3c702d27e1ab9..f798573b95f566ba026442707024ee1dceb13d1d 100644 --- a/NEWS +++ b/NEWS @@ -239,6 +239,9 @@ documents those changes that are of interest to users and admins. ======================== -- Fix DefMemPerCPU for partition definitions. -- Fix to create a reservation with licenses and no nodes. + -- Fix issue with assoc_mgr if a bad state file is given and the database + isn't up at the time the slurmctld starts, not running the + priority/multifactor plugin, and then the database is started up later. * Changes in SLURM 2.3.5 ======================== diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c index eb610b4b89dc000667d813452b45f62782d9e2b8..4e2f7c68f296e5686a8e92a57522c71e5ec3dafd 100644 --- a/src/common/assoc_mgr.c +++ b/src/common/assoc_mgr.c @@ -1315,11 +1315,13 @@ extern int assoc_mgr_get_user_assocs(void *db_conn, xassert(assoc->uid != NO_VAL); xassert(assoc_list); - if (!assoc_mgr_association_list) { - if (_get_assoc_mgr_association_list(db_conn, enforce) - == SLURM_ERROR) + /* Call assoc_mgr_refresh_lists instead of just getting the + association list because we need qos and user lists before + the association list can be made. + */ + if (!assoc_mgr_association_list) + if (assoc_mgr_refresh_lists(db_conn, NULL) == SLURM_ERROR) return SLURM_ERROR; - } assoc_mgr_lock(&locks); @@ -1365,11 +1367,15 @@ extern int assoc_mgr_fill_in_assoc(void *db_conn, if (assoc_pptr) *assoc_pptr = NULL; - if (!assoc_mgr_association_list) { - if (_get_assoc_mgr_association_list(db_conn, enforce) - == SLURM_ERROR) + + /* Call assoc_mgr_refresh_lists instead of just getting the + association list because we need qos and user lists before + the association list can be made. + */ + if (!assoc_mgr_association_list) + if (assoc_mgr_refresh_lists(db_conn, NULL) == SLURM_ERROR) return SLURM_ERROR; - } + if ((!assoc_mgr_association_list || !list_count(assoc_mgr_association_list)) && !(enforce & ACCOUNTING_ENFORCE_ASSOCS)) @@ -3195,9 +3201,12 @@ extern int assoc_mgr_validate_assoc_id(void *db_conn, assoc_mgr_lock_t locks = { READ_LOCK, NO_LOCK, NO_LOCK, NO_LOCK, NO_LOCK }; + /* Call assoc_mgr_refresh_lists instead of just getting the + association list because we need qos and user lists before + the association list can be made. + */ if (!assoc_mgr_association_list) - if (_get_assoc_mgr_association_list(db_conn, enforce) - == SLURM_ERROR) + if (assoc_mgr_refresh_lists(db_conn, NULL) == SLURM_ERROR) return SLURM_ERROR; assoc_mgr_lock(&locks);