diff --git a/NEWS b/NEWS index 56a37d476e12f0848db75365add8d0949146e07f..22e5a08d22f1247298a589fb810eb942ebee7ae9 100644 --- a/NEWS +++ b/NEWS @@ -120,6 +120,8 @@ documents those changes that are of interest to users and admins. -- Fix bug in select/cons_res that would incorrectly satify a tasks's --cpus-per-task specification by allocating the task CPUs on more than one node. + -- Add support for hostlist expressions containing up to two numeric + expressions (e.g. "rack[0-15]_blade[0-41]"). * Changes in SLURM 1.3.11 ========================= diff --git a/doc/html/quickstart_admin.shtml b/doc/html/quickstart_admin.shtml index 451a57ee85b352e717d996d645f107cbfcf2466b..b8d2923d964b955fc5eae9f35905772fed0dea06 100644 --- a/doc/html/quickstart_admin.shtml +++ b/doc/html/quickstart_admin.shtml @@ -341,8 +341,11 @@ These numbers indicate the boundaries of a rectangular prism (e.g. "bgl[000x144,400x544]"). See our <a href="bluegene.html">Blue Gene User and Administrator Guide</a> for more details. -Presently the numeric range must be the last characters in the -node name (e.g. "unit[0-31]rack1" is invalid).</p> +Up to two numeric ranges can be included in the expression +(e.g. "rack[0-63]_blade[0-41]"). +If one or more numeric expressions are included, one of them +must be at the end of the name (e.g. "unit[0-31]rack" is invalid), +but arbitrary names can always be used in a comma separated list.</p> <p>Node names can have up to three name specifications: <b>NodeName</b> is the name used by all SLURM tools when referring to the node, diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index ee09ff8a1ccaf4a4922e25e041dc20596e64ddf8..9bf4ac7b52daba6fe23c2c98277a68e21faa1a0c 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1443,14 +1443,17 @@ separated by a "\-" (e.g. "linux[0\-64,128]", or "lx[15,18,32\-33]"). Note that the numeric ranges can include one or more leading zeros to indicate the numeric portion has a fixed number of digits (e.g. "linux[0000\-1023]"). +Up to two numeric ranges can be included in the expression +(e.g. "rack[0\-63]_blade[0\-41]"). +If one or more numeric expressions are included, one of them +must be at the end of the name (e.g. "unit[0\-31]rack" is invalid), +but arbitrary names can always be used in a comma separated list. .LP On BlueGene systems only, the square brackets should contain pairs of three digit numbers separated by a "x". These numbers indicate the boundaries of a rectangular prism (e.g. "bgl[000x144,400x544]"). See BlueGene documentation for more details. -Presently the numeric range must be the last characters in the -node name (e.g. "unit[0\-31]rack1" is invalid). The node configuration specified the following information: .TP diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c index 4829e551237cbb7acc2f4e091430037efd21637a..a823c6ad059f64c5833a8d057600829439a38be6 100644 --- a/src/common/assoc_mgr.c +++ b/src/common/assoc_mgr.c @@ -1560,15 +1560,6 @@ extern int assoc_mgr_update_assocs(acct_update_object_t *update) continue; } - /* only check for on the slurmdbd */ - if(!assoc_mgr_cluster_name && object->cluster - && (!rec->cluster - || strcasecmp(object->cluster, - rec->cluster))) { - debug4("not the right cluster"); - continue; - } - if(object->partition && (!rec->partition || strcasecmp(object->partition, @@ -1586,7 +1577,7 @@ extern int assoc_mgr_update_assocs(acct_update_object_t *update) rc = SLURM_ERROR; break; } - debug("updating assoc %u", rec->id); + if(object->fairshare != NO_VAL) { rec->fairshare = object->fairshare; if(setup_childern) { @@ -1646,12 +1637,12 @@ extern int assoc_mgr_update_assocs(acct_update_object_t *update) } } - if(!parents_changed) { + if(!slurmdbd_conf && !parents_changed) { + debug("updating assoc %u", rec->id); slurm_mutex_lock(&assoc_mgr_qos_lock); log_assoc_rec(rec, assoc_mgr_qos_list); slurm_mutex_unlock(&assoc_mgr_qos_lock); } - break; case ACCT_ADD_ASSOC: if(rec) { @@ -2154,6 +2145,17 @@ extern int dump_assoc_mgr_state(char *state_save_location) slurm_mutex_unlock(&assoc_mgr_qos_lock); } + if(assoc_mgr_wckey_list) { + memset(&msg, 0, sizeof(dbd_list_msg_t)); + slurm_mutex_lock(&assoc_mgr_wckey_lock); + msg.my_list = assoc_mgr_wckey_list; + /* let us know what to unpack */ + pack16(DBD_ADD_WCKEYS, buffer); + slurmdbd_pack_list_msg(SLURMDBD_VERSION, + DBD_ADD_WCKEYS, &msg, buffer); + slurm_mutex_unlock(&assoc_mgr_wckey_lock); + } + /* write the buffer to file */ old_file = xstrdup(state_save_location); xstrcat(old_file, "/assoc_mgr_state.old"); @@ -2490,6 +2492,23 @@ extern int load_assoc_mgr_state(char *state_save_location) msg->my_list = NULL; slurmdbd_free_list_msg(SLURMDBD_VERSION, msg); break; + case DBD_ADD_WCKEYS: + error_code = slurmdbd_unpack_list_msg( + SLURMDBD_VERSION, DBD_ADD_WCKEYS, &msg, buffer); + if (error_code != SLURM_SUCCESS) + goto unpack_error; + else if(!msg->my_list) { + error("No qos retrieved"); + break; + } + slurm_mutex_lock(&assoc_mgr_wckey_lock); + assoc_mgr_wckey_list = msg->my_list; + debug("Recovered %u wckeys", + list_count(assoc_mgr_wckey_list)); + slurm_mutex_unlock(&assoc_mgr_wckey_lock); + msg->my_list = NULL; + slurmdbd_free_list_msg(SLURMDBD_VERSION, msg); + break; default: error("unknown type %u given", type); goto unpack_error; diff --git a/src/common/hostlist.c b/src/common/hostlist.c index bc95536134df08a6aa244102d41ecb325681dde6..1d05091df777ca8d224dba2e466adc4bd8d6dc49 100644 --- a/src/common/hostlist.c +++ b/src/common/hostlist.c @@ -437,7 +437,7 @@ static char * _next_tok(char *sep, char **str) char *tok; /* push str past any leading separators */ - while (**str != '\0' && strchr(sep, **str) != '\0') + while ((**str != '\0') && (strchr(sep, **str) != NULL)) (*str)++; if (**str == '\0') @@ -447,20 +447,34 @@ static char * _next_tok(char *sep, char **str) tok = *str; /* push str past token and leave pointing to first separator */ - while (**str != '\0' && strchr(sep, **str) == '\0') + while ((**str != '\0') && (strchr(sep, **str) == NULL)) (*str)++; - /* if _single_ opening bracket exists b/w tok and str, push str - * past first closing bracket */ - if ( memchr(tok, '[', *str - tok) != NULL - && memchr(tok, ']', *str - tok) == NULL ) { + /* if _single_ opening bracket exists b/w tok and str, + * push str past first closing bracket */ + if ((memchr(tok, '[', *str - tok) != NULL) && + (memchr(tok, ']', *str - tok) == NULL)) { char *q = strchr(*str, ']'); - if (q && memchr(*str, '[', q - *str) == NULL) - *str = q + 1; + if (q && (memchr(*str, '[', q - *str) == NULL)) + *str = ++q; + + /* push str past token and leave pointing to next separator */ + while ((**str != '\0') && (strchr(sep, **str) == NULL)) + (*str)++; + + /* if _second_ opening bracket exists b/w tok and str, + * push str past second closing bracket */ + if ((**str != '\0') && + (memchr(tok, '[', *str - q) != NULL) && + (memchr(tok, ']', *str - q) == NULL)) { + q = strchr(*str, ']'); + if (q && (memchr(*str, '[', q - *str) == NULL)) + *str = q + 1; + } } /* nullify consecutive separators and push str beyond them */ - while (**str != '\0' && strchr(sep, **str) != '\0') + while ((**str != '\0') && (strchr(sep, **str) != '\0')) *(*str)++ = '\0'; return tok; @@ -1657,16 +1671,52 @@ static int _parse_range_list(char *str, struct _range *ranges, int len) return count; } -static void -_push_range_list(hostlist_t hl, char *pfx, struct _range *rng, - int n) +/* Validate prefix and push with the numeric suffix onto the hostlist + * The prefix can contain a up to one range expresseion (e.g. "rack[1-4]_"). + * RET 0 on success, -1 on failure (invalid prefix) */ +static int +_push_range_list(hostlist_t hl, char *prefix, struct _range *range, + int n) { - int i; - - for (i = 0; i < n; i++) { - hostlist_push_hr(hl, pfx, rng->lo, rng->hi, rng->width); - rng++; + int i, j, k, nr; + char *p, *q; + char new_prefix[1024], tmp_prefix[1024]; + + strncpy(tmp_prefix, prefix, sizeof(tmp_prefix)); + if (((p = strrchr(tmp_prefix, '[')) != NULL) && + ((q = strrchr(p, ']')) != NULL)) { + struct _range prefix_range[MAX_RANGES]; + struct _range *saved_range = range, *pre_range = prefix_range; + *p++ = '\0'; + *q++ = '\0'; + if (strrchr(tmp_prefix, '[') != NULL) + return -1; /* third range is illegal */ + nr = _parse_range_list(p, prefix_range, MAX_RANGES); + if (nr < 0) + return -1; /* bad numeric expression */ + for (i = 0; i < nr; i++) { + for (j = pre_range->lo; j <= pre_range->hi; j++) { + snprintf(new_prefix, sizeof(new_prefix), + "%s%d%s", tmp_prefix, j, q); + range = saved_range; + for (k = 0; k < n; k++) { + hostlist_push_hr(hl, new_prefix, + range->lo, range->hi, + range->width); + range++; + } + } + pre_range++; + } + return 0; } + + for (k = 0; k < n; k++) { + hostlist_push_hr(hl, prefix, + range->lo, range->hi, range->width); + range++; + } + return 0; } /* @@ -1693,7 +1743,7 @@ _hostlist_create_bracketed(const char *hostlist, char *sep, char *r_op) while ((tok = _next_tok(sep, &str)) != NULL) { strncpy(cur_tok, tok, 1024); - if ((p = strchr(tok, '[')) != NULL) { + if ((p = strrchr(tok, '[')) != NULL) { char *q, *prefix = tok; *p++ = '\0'; @@ -1706,7 +1756,8 @@ _hostlist_create_bracketed(const char *hostlist, char *sep, char *r_op) nr = _parse_range_list(p, ranges, MAX_RANGES); if (nr < 0) goto error; - _push_range_list(new, prefix, ranges, nr); + if (_push_range_list(new, prefix, ranges, nr)) + goto error; } else { diff --git a/src/database/mysql_common.c b/src/database/mysql_common.c index f1e729002a6d546b2c29ed662d0d4bcb7e16e18c..2686561f82252844a3e8ce5b152be1b833b89c8a 100644 --- a/src/database/mysql_common.c +++ b/src/database/mysql_common.c @@ -128,14 +128,13 @@ static int _mysql_make_table_current(MYSQL *mysql_db, char *table_name, DEF_TIMERS; + /* figure out the keys in the table */ query = xstrdup_printf("show index from %s", table_name); - if(!(result = mysql_db_query_ret(mysql_db, query, 0))) { xfree(query); return SLURM_ERROR; } xfree(query); - columns = list_create(slurm_destroy_char); while((row = mysql_fetch_row(result))) { // row[2] is the key name if(!strcasecmp(row[2], "PRIMARY")) @@ -143,11 +142,13 @@ static int _mysql_make_table_current(MYSQL *mysql_db, char *table_name, else if(!old_index) old_index = xstrdup(row[2]); } + mysql_free_result(result); + /* figure out the existing columns in the table */ query = xstrdup_printf("show columns from %s", table_name); - if(!(result = mysql_db_query_ret(mysql_db, query, 0))) { xfree(query); + xfree(old_index); return SLURM_ERROR; } xfree(query); @@ -157,6 +158,8 @@ static int _mysql_make_table_current(MYSQL *mysql_db, char *table_name, list_append(columns, col); } mysql_free_result(result); + + itr = list_iterator_create(columns); query = xstrdup_printf("alter table %s", table_name); START_TIMER; diff --git a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c index d05ac93c576007add98f7c03cd343fa89bb3ed40..5d9de3521e3435f30934a2d84ee34aecfc4d498e 100644 --- a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c +++ b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c @@ -156,6 +156,9 @@ extern List acct_storage_p_remove_coord(mysql_conn_t *mysql_conn, uint32_t uid, List acct_list, acct_user_cond_t *user_cond); +extern List acct_storage_p_remove_wckeys(mysql_conn_t *mysql_conn, + uint32_t uid, + acct_wckey_cond_t *wckey_cond); static int _set_usage_information(char **usage_table, slurmdbd_msg_type_t type, time_t *usage_start, time_t *usage_end) @@ -1806,7 +1809,9 @@ static int _remove_common(mysql_conn_t *mysql_conn, * really delete it for accounting purposes. This is for * corner cases most of the time this won't matter. */ - if(table == acct_coord_table || table == qos_table) { + if((table == acct_coord_table) + || (table == qos_table) + || (table == wckey_table)) { /* This doesn't apply for these tables since we are * only looking for association type tables. */ @@ -1869,7 +1874,8 @@ static int _remove_common(mysql_conn_t *mysql_conn, clusters */ return SLURM_SUCCESS; - } else if(table == acct_coord_table) + } else if((table == acct_coord_table) + || (table == wckey_table)) return SLURM_SUCCESS; /* mark deleted=1 or remove completely the @@ -3029,6 +3035,7 @@ extern int acct_storage_p_add_users(mysql_conn_t *mysql_conn, uint32_t uid, char *extra = NULL; int affect_rows = 0; List assoc_list = list_create(destroy_acct_association_rec); + List wckey_list = list_create(destroy_acct_wckey_rec); if(_check_connection(mysql_conn) != SLURM_SUCCESS) return SLURM_ERROR; @@ -3057,7 +3064,7 @@ extern int acct_storage_p_add_users(mysql_conn_t *mysql_conn, uint32_t uid, if(object->default_wckey) { xstrcat(cols, ", default_wckey"); - xstrfmtcat(vals, ", %u", object->default_wckey); + xstrfmtcat(vals, ", \"%s\"", object->default_wckey); xstrfmtcat(extra, ", default_wckey=\"%s\"", object->default_wckey); } @@ -3105,10 +3112,11 @@ extern int acct_storage_p_add_users(mysql_conn_t *mysql_conn, uint32_t uid, user_name, extra); xfree(extra); - if(!object->assoc_list) - continue; + if(object->assoc_list) + list_transfer(assoc_list, object->assoc_list); - list_transfer(assoc_list, object->assoc_list); + if(object->wckey_list) + list_transfer(wckey_list, object->wckey_list); } list_iterator_destroy(itr); xfree(user_name); @@ -3136,6 +3144,15 @@ extern int acct_storage_p_add_users(mysql_conn_t *mysql_conn, uint32_t uid, } list_destroy(assoc_list); + if(list_count(wckey_list)) { + if(acct_storage_p_add_wckeys(mysql_conn, uid, wckey_list) + == SLURM_ERROR) { + error("Problem adding user wckeys"); + rc = SLURM_ERROR; + } + } + list_destroy(wckey_list); + return rc; #else return SLURM_ERROR; @@ -5482,6 +5499,7 @@ extern List acct_storage_p_remove_users(mysql_conn_t *mysql_conn, uint32_t uid, MYSQL_ROW row; acct_user_cond_t user_coord_cond; acct_association_cond_t assoc_cond; + acct_wckey_cond_t wckey_cond; if(!user_cond) { error("we need something to remove"); @@ -5600,6 +5618,15 @@ extern List acct_storage_p_remove_users(mysql_conn_t *mysql_conn, uint32_t uid, mysql_conn, uid, NULL, &user_coord_cond); if(coord_list) list_destroy(coord_list); + + /* We need to remove these users from the wckey table */ + memset(&wckey_cond, 0, sizeof(acct_wckey_cond_t)); + wckey_cond.user_list = assoc_cond.user_list; + coord_list = acct_storage_p_remove_wckeys( + mysql_conn, uid, &wckey_cond); + if(coord_list) + list_destroy(coord_list); + list_destroy(assoc_cond.user_list); user_name = uid_to_string((uid_t) uid); @@ -5967,6 +5994,7 @@ extern List acct_storage_p_remove_clusters(mysql_conn_t *mysql_conn, #ifdef HAVE_MYSQL ListIterator itr = NULL; List ret_list = NULL; + List tmp_list = NULL; int rc = SLURM_SUCCESS; char *object = NULL; char *extra = NULL, *query = NULL, @@ -5974,6 +6002,7 @@ extern List acct_storage_p_remove_clusters(mysql_conn_t *mysql_conn, time_t now = time(NULL); char *user_name = NULL; int set = 0; + acct_wckey_cond_t wckey_cond; MYSQL_RES *result = NULL; MYSQL_ROW row; @@ -6039,6 +6068,14 @@ extern List acct_storage_p_remove_clusters(mysql_conn_t *mysql_conn, } xfree(query); + /* We need to remove these clusters from the wckey table */ + memset(&wckey_cond, 0, sizeof(acct_wckey_cond_t)); + wckey_cond.cluster_list = ret_list; + tmp_list = acct_storage_p_remove_wckeys( + mysql_conn, uid, &wckey_cond); + if(tmp_list) + list_destroy(tmp_list); + /* We should not need to delete any cluster usage just set it * to deleted */ xstrfmtcat(query, @@ -6447,7 +6484,7 @@ extern List acct_storage_p_remove_qos(mysql_conn_t *mysql_conn, uint32_t uid, xfree(query); user_name = uid_to_string((uid_t) uid); - rc = _remove_common(mysql_conn, DBD_REMOVE_ACCOUNTS, now, + rc = _remove_common(mysql_conn, DBD_REMOVE_QOS, now, user_name, qos_table, name_char, assoc_char); xfree(assoc_char); xfree(name_char); @@ -6467,7 +6504,84 @@ extern List acct_storage_p_remove_wckeys(mysql_conn_t *mysql_conn, uint32_t uid, acct_wckey_cond_t *wckey_cond) { +#ifdef HAVE_MYSQL + List ret_list = NULL; + int rc = SLURM_SUCCESS; + char *extra = NULL, *query = NULL, + *name_char = NULL, *assoc_char = NULL; + time_t now = time(NULL); + char *user_name = NULL; + int set = 0; + MYSQL_RES *result = NULL; + MYSQL_ROW row; + + if(!wckey_cond) { + xstrcat(extra, " where deleted=0"); + goto empty; + } + + if(_check_connection(mysql_conn) != SLURM_SUCCESS) + return NULL; + + set = _setup_wckey_cond_limits(wckey_cond, &extra); + +empty: + if(!extra) { + error("Nothing to remove"); + return NULL; + } + + query = xstrdup_printf("select t1.id, t1.name from %s as t1%s;", + wckey_table, extra); + xfree(extra); + if(!(result = mysql_db_query_ret( + mysql_conn->db_conn, query, 0))) { + xfree(query); + return NULL; + } + + name_char = NULL; + ret_list = list_create(slurm_destroy_char); + while((row = mysql_fetch_row(result))) { + acct_wckey_rec_t *wckey_rec = NULL; + + list_append(ret_list, xstrdup(row[1])); + if(!name_char) + xstrfmtcat(name_char, "id=\"%s\"", row[0]); + else + xstrfmtcat(name_char, " || id=\"%s\"", row[0]); + + wckey_rec = xmalloc(sizeof(acct_wckey_rec_t)); + /* we only need id when removing no real need to init */ + wckey_rec->id = atoi(row[0]); + _addto_update_list(mysql_conn->update_list, ACCT_REMOVE_WCKEY, + wckey_rec); + } + mysql_free_result(result); + + if(!list_count(ret_list)) { + errno = SLURM_NO_CHANGE_IN_DATA; + debug3("didn't effect anything\n%s", query); + xfree(query); + return ret_list; + } + xfree(query); + + user_name = uid_to_string((uid_t) uid); + rc = _remove_common(mysql_conn, DBD_REMOVE_WCKEYS, now, + user_name, wckey_table, name_char, NULL); + xfree(assoc_char); + xfree(name_char); + xfree(user_name); + if (rc == SLURM_ERROR) { + list_destroy(ret_list); + return NULL; + } + + return ret_list; +#else return NULL; +#endif } extern List acct_storage_p_get_users(mysql_conn_t *mysql_conn, uid_t uid, @@ -9326,26 +9440,39 @@ extern int jobacct_storage_p_job_start(mysql_conn_t *mysql_conn, 1, NULL) != SLURM_SUCCESS) { List wckey_list = NULL; acct_wckey_rec_t *wckey_ptr = NULL; - acct_association_rec_t assoc_rec; - - memset(&assoc_rec, 0, - sizeof(acct_association_rec_t)); - /* We have to get the user name from - the association just in case we - don't have uid's constant across - the system. */ - assoc_rec.id = job_ptr->assoc_id; - if(assoc_mgr_fill_in_assoc( - mysql_conn, &assoc_rec, 1, NULL) - != SLURM_SUCCESS) + char *assoc_query = NULL; + MYSQL_RES *result = NULL; + MYSQL_ROW row; + + /* Just so we don't have to keep a + cache of the associations around we + will just query the db for the user + name of the association id. Since + this should sort of be a rare case + this isn't too bad. + */ + assoc_query = xstrdup_printf( + "select user from %s where id=%u", + assoc_table, job_ptr->assoc_id); + debug3("%d(%d) query\n%s", + mysql_conn->conn, __LINE__, assoc_query); + if(!(result = + mysql_db_query_ret(mysql_conn->db_conn, + assoc_query, 0))) { + xfree(assoc_query); + goto end_it; + } + xfree(assoc_query); + + if(!(row = mysql_fetch_row(result))) goto no_wckeyid; - + wckey_list = list_create( destroy_acct_wckey_rec); wckey_ptr = xmalloc(sizeof(acct_wckey_rec_t)); wckey_ptr->name = xstrdup(wckey); - wckey_ptr->user = xstrdup(assoc_rec.user); + wckey_ptr->user = xstrdup(row[0]); wckey_ptr->cluster = xstrdup(cluster_name); list_append(wckey_list, wckey_ptr); /* we have already checked to make @@ -9360,6 +9487,8 @@ extern int jobacct_storage_p_job_start(mysql_conn_t *mysql_conn, assoc_mgr_fill_in_wckey( mysql_conn, &wckey_rec, 1, NULL); + + mysql_free_result(result); list_destroy(wckey_list); } wckeyid = wckey_rec.id; @@ -9375,6 +9504,7 @@ extern int jobacct_storage_p_job_start(mysql_conn_t *mysql_conn, rc = mysql_db_query(mysql_conn->db_conn, query); } +end_it: xfree(block_id); xfree(jname); xfree(wckey); diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index e31d0cd484eaa8f77733f160db1c740f7b3e836a..71d1f69a93cc4a1c40770f4572a9fea27d874736 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -313,7 +313,8 @@ int main(int argc, char *argv[]) memset(&assoc_init_arg, 0, sizeof(assoc_init_args_t)); assoc_init_arg.enforce = accounting_enforce; assoc_init_arg.remove_assoc_notify = _remove_assoc; - assoc_init_arg.cache_level = ASSOC_MGR_CACHE_ALL; + assoc_init_arg.cache_level = ASSOC_MGR_CACHE_ASSOC | + ASSOC_MGR_CACHE_USER | ASSOC_MGR_CACHE_QOS; if (assoc_mgr_init(acct_db_conn, &assoc_init_arg)) { if(accounting_enforce) diff --git a/src/slurmdbd/slurmdbd.c b/src/slurmdbd/slurmdbd.c index 027af24024f114bb4eb7708dfe748c6c5a978bdb..a6abe80d321eb4f5636aa328f16b13724085e39c 100644 --- a/src/slurmdbd/slurmdbd.c +++ b/src/slurmdbd/slurmdbd.c @@ -145,7 +145,7 @@ int main(int argc, char *argv[]) /* If we are tacking wckey we need to cache associations and wckeys if we aren't only cache the users */ if(slurmdbd_conf->track_wckey) - assoc_init_arg.cache_level = ASSOC_MGR_CACHE_ASSOC | + assoc_init_arg.cache_level = ASSOC_MGR_CACHE_USER | ASSOC_MGR_CACHE_WCKEY; else assoc_init_arg.cache_level = ASSOC_MGR_CACHE_USER; diff --git a/testsuite/expect/test21.19 b/testsuite/expect/test21.19 index 6c305f5abc3f1fc1791dde144344ef3960f75442..38a05e4246f1a8dbd27cd43182203f0d65c4ea7b 100755 --- a/testsuite/expect/test21.19 +++ b/testsuite/expect/test21.19 @@ -996,7 +996,7 @@ if { $exit_code } { # Use sacctmgr to list the test user modification # set matches 0 -set my_pid [spawn $sacctmgr -n -p list user names=$us1,$us2,$us3 withcoor] +set my_pid [spawn $sacctmgr -n -p list user names=$us1,$us2,$us3 withcoor format=user,DefaultAccount,Admin,Coord] expect { -re "There was a problem" { send_user "FAILURE: there was a problem with the sacctmgr command\n" @@ -1034,7 +1034,7 @@ if { $exit_code } { # Use sacctmgr to list the test coordinator additions # set matches 0 -set my_pid [spawn $sacctmgr -n -p list user names=$us1,$us2,$us3 withcoor] +set my_pid [spawn $sacctmgr -n -p list user names=$us1,$us2,$us3 withcoor format=user,DefaultAccount,Admin,Coord] expect { -re "There was a problem" { send_user "FAILURE: there was a problem with the sacctmgr command\n"