diff --git a/src/sacctmgr/cluster_functions.c b/src/sacctmgr/cluster_functions.c index 12ecbc53a50e87784c6627a0f8a88a7c8c24a722..649e926639fa89596c226720d5cc883841203d29 100644 --- a/src/sacctmgr/cluster_functions.c +++ b/src/sacctmgr/cluster_functions.c @@ -457,6 +457,9 @@ extern int sacctmgr_list_cluster(int argc, char *argv[]) while((cluster = list_next(itr))) { int curr_inx = 1; slurmdb_association_rec_t *assoc = cluster->root_assoc; + /* set up the working cluster rec so nodecnt's and node names + * are handled correctly */ + working_cluster_rec = cluster; while((field = list_next(itr2))) { switch(field->type) { case PRINT_CLUSTER: @@ -634,6 +637,8 @@ extern int sacctmgr_list_cluster(int argc, char *argv[]) list_iterator_reset(itr2); printf("\n"); } + /* clear the working cluster rec */ + working_cluster_rec = NULL; list_iterator_destroy(itr2); list_iterator_destroy(itr);