Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

create v2.2.4 tag

  • Loading branch information...
commit 046ba14c4fc20c42f97901075ba84876b2185449 2 parents 860463a + 9c35d4a
Morris Jette jette authored
4 NEWS
View
@@ -47,6 +47,10 @@ documents those changes that are of interest to users and admins.
doesn't exist in the /etc/passwd file and the account you are trying
to add them to doesn't exist it would print (null) instead of the bad
account name.
+ -- Fix associations/qos for when adding back a previously deleted object
+ the object will be cleared of all old limits.
+ -- BLUEGENE - Added back a lock when creating dynamic blocks to be more thread
+ safe on larger systems with heavy load.
* Changes in SLURM 2.2.3
========================
4 src/common/pack.c
View
@@ -218,9 +218,8 @@ void packdouble(double val, Buf buffer)
/* The 0.5 is here to round off. We have found on systems going out
* more than 15 decimals will mess things up, but this corrects it. */
- uval.d = (val * FLOAT_MULT) + 0.5;
+ uval.d = (val * FLOAT_MULT);
nl = HTON_uint64(uval.u);
-
if (remaining_buf(buffer) < sizeof(nl)) {
if (buffer->size > (MAX_BUF_SIZE - BUF_SIZE)) {
error("packdouble: buffer size too large");
@@ -255,6 +254,7 @@ int unpackdouble(double *valp, Buf buffer)
uval.u = NTOH_uint64(nl);
*valp = uval.d / FLOAT_MULT;
+
return SLURM_SUCCESS;
}
77 src/plugins/accounting_storage/mysql/accounting_storage_mysql.c
View
@@ -1327,20 +1327,59 @@ extern int remove_cluster_tables(mysql_conn_t *mysql_conn, char *cluster_name)
extern int setup_association_limits(slurmdb_association_rec_t *assoc,
char **cols, char **vals,
char **extra, qos_level_t qos_level,
- bool get_fs)
+ bool for_add)
{
if (!assoc)
return SLURM_ERROR;
- if ((int32_t)assoc->shares_raw >= 0) {
- xstrcat(*cols, ", shares");
- xstrfmtcat(*vals, ", %u", assoc->shares_raw);
- xstrfmtcat(*extra, ", shares=%u", assoc->shares_raw);
- } else if ((assoc->shares_raw == INFINITE) || get_fs) {
+ if (for_add) {
+ /* If we are adding we should make sure we don't get
+ old reside sitting around from a former life.
+ */
+ if (assoc->shares_raw == NO_VAL)
+ assoc->shares_raw = INFINITE;
+ if (assoc->grp_cpu_mins == (uint64_t)NO_VAL)
+ assoc->grp_cpu_mins = (uint64_t)INFINITE;
+ if (assoc->grp_cpu_run_mins == (uint64_t)NO_VAL)
+ assoc->grp_cpu_run_mins = (uint64_t)INFINITE;
+ if (assoc->grp_cpus == NO_VAL)
+ assoc->grp_cpus = INFINITE;
+ if (assoc->grp_jobs == NO_VAL)
+ assoc->grp_jobs = INFINITE;
+ if (assoc->grp_nodes == NO_VAL)
+ assoc->grp_nodes = INFINITE;
+ if (assoc->grp_submit_jobs == NO_VAL)
+ assoc->grp_submit_jobs = INFINITE;
+ if (assoc->grp_wall == NO_VAL)
+ assoc->grp_wall = INFINITE;
+ if (assoc->max_cpu_mins_pj == (uint64_t)NO_VAL)
+ assoc->max_cpu_mins_pj = (uint64_t)INFINITE;
+ if (assoc->max_cpu_run_mins == (uint64_t)NO_VAL)
+ assoc->max_cpu_run_mins = (uint64_t)INFINITE;
+ if (assoc->max_cpus_pj == NO_VAL)
+ assoc->max_cpus_pj = INFINITE;
+ if (assoc->max_jobs == NO_VAL)
+ assoc->max_jobs = INFINITE;
+ if (assoc->max_nodes_pj == NO_VAL)
+ assoc->max_nodes_pj = INFINITE;
+ if (assoc->max_submit_jobs == NO_VAL)
+ assoc->max_submit_jobs = INFINITE;
+ if (assoc->max_wall_pj == NO_VAL)
+ assoc->max_wall_pj = INFINITE;
+ if (assoc->def_qos_id == NO_VAL)
+ assoc->def_qos_id = INFINITE;
+ }
+
+ if (assoc->shares_raw == INFINITE) {
xstrcat(*cols, ", shares");
xstrcat(*vals, ", 1");
xstrcat(*extra, ", shares=1");
assoc->shares_raw = 1;
+ } else if ((assoc->shares_raw != NO_VAL)
+ && (int32_t)assoc->shares_raw >= 0) {
+ xstrcat(*cols, ", shares");
+ xstrfmtcat(*vals, ", %u", assoc->shares_raw);
+ xstrfmtcat(*extra, ", shares=%u", assoc->shares_raw);
}
if (assoc->grp_cpu_mins == (uint64_t)INFINITE) {
@@ -1356,6 +1395,19 @@ extern int setup_association_limits(slurmdb_association_rec_t *assoc,
assoc->grp_cpu_mins);
}
+ if (assoc->grp_cpu_run_mins == (uint64_t)INFINITE) {
+ xstrcat(*cols, ", grp_cpu_run_mins");
+ xstrcat(*vals, ", NULL");
+ xstrcat(*extra, ", grp_cpu_run_mins=NULL");
+ } else if ((assoc->grp_cpu_run_mins != (uint64_t)NO_VAL)
+ && ((int64_t)assoc->grp_cpu_run_mins >= 0)) {
+ xstrcat(*cols, ", grp_cpu_run_mins");
+ xstrfmtcat(*vals, ", %"PRIu64"",
+ assoc->grp_cpu_run_mins);
+ xstrfmtcat(*extra, ", grp_cpu_run_mins=%"PRIu64"",
+ assoc->grp_cpu_run_mins);
+ }
+
if (assoc->grp_cpus == INFINITE) {
xstrcat(*cols, ", grp_cpus");
xstrcat(*vals, ", NULL");
@@ -1435,6 +1487,19 @@ extern int setup_association_limits(slurmdb_association_rec_t *assoc,
assoc->max_cpu_mins_pj);
}
+ if (assoc->max_cpu_run_mins == (uint64_t)INFINITE) {
+ xstrcat(*cols, ", max_cpu_run_mins");
+ xstrcat(*vals, ", NULL");
+ xstrcat(*extra, ", max_cpu_run_mins=NULL");
+ } else if ((assoc->max_cpu_run_mins != (uint64_t)NO_VAL)
+ && ((int64_t)assoc->max_cpu_run_mins >= 0)) {
+ xstrcat(*cols, ", max_cpu_run_mins");
+ xstrfmtcat(*vals, ", %"PRIu64"",
+ assoc->max_cpu_run_mins);
+ xstrfmtcat(*extra, ", max_cpu_run_mins=%"PRIu64"",
+ assoc->max_cpu_run_mins);
+ }
+
if (assoc->max_cpus_pj == INFINITE) {
xstrcat(*cols, ", max_cpus_pj");
xstrcat(*vals, ", NULL");
2  src/plugins/accounting_storage/mysql/accounting_storage_mysql.h
View
@@ -118,7 +118,7 @@ extern int remove_cluster_tables(mysql_conn_t *mysql_conn, char *cluster_name);
extern int setup_association_limits(slurmdb_association_rec_t *assoc,
char **cols, char **vals,
char **extra, qos_level_t qos_level,
- bool get_fs);
+ bool for_add);
extern int modify_common(mysql_conn_t *mysql_conn,
uint16_t type,
time_t now,
2  src/plugins/accounting_storage/mysql/as_mysql_cluster.c
View
@@ -3,7 +3,7 @@
*****************************************************************************
*
* Copyright (C) 2004-2007 The Regents of the University of California.
- * Copyright (C) 2008-2010 Lawrence Livermore National Security.
+ * Copyright (C) 2008-2011 Lawrence Livermore National Security.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Danny Auble <da@llnl.gov>
*
55 src/plugins/accounting_storage/mysql/as_mysql_qos.c
View
@@ -78,11 +78,56 @@ static int _preemption_loop(mysql_conn_t *mysql_conn, int begin_qosid,
static int _setup_qos_limits(slurmdb_qos_rec_t *qos,
char **cols, char **vals,
- char **extra, char **added_preempt)
+ char **extra, char **added_preempt,
+ bool for_add)
{
if (!qos)
return SLURM_ERROR;
+ if (for_add) {
+ /* If we are adding we should make sure we don't get
+ old reside sitting around from a former life.
+ */
+ if (!qos->description)
+ qos->description = xstrdup("");
+ if (qos->flags & QOS_FLAG_NOTSET)
+ qos->flags = 0;
+ if (qos->grp_cpu_mins == (uint64_t)NO_VAL)
+ qos->grp_cpu_mins = (uint64_t)INFINITE;
+ if (qos->grp_cpu_run_mins == (uint64_t)NO_VAL)
+ qos->grp_cpu_run_mins = (uint64_t)INFINITE;
+ if (qos->grp_cpus == NO_VAL)
+ qos->grp_cpus = INFINITE;
+ if (qos->grp_jobs == NO_VAL)
+ qos->grp_jobs = INFINITE;
+ if (qos->grp_nodes == NO_VAL)
+ qos->grp_nodes = INFINITE;
+ if (qos->grp_submit_jobs == NO_VAL)
+ qos->grp_submit_jobs = INFINITE;
+ if (qos->grp_wall == NO_VAL)
+ qos->grp_wall = INFINITE;
+ if (qos->max_cpu_mins_pj == (uint64_t)NO_VAL)
+ qos->max_cpu_mins_pj = (uint64_t)INFINITE;
+ if (qos->grp_cpu_run_mins == (uint64_t)NO_VAL)
+ qos->grp_cpu_run_mins = (uint64_t)INFINITE;
+ if (qos->max_cpus_pj == NO_VAL)
+ qos->max_cpus_pj = INFINITE;
+ if (qos->max_jobs_pu == NO_VAL)
+ qos->max_jobs_pu = INFINITE;
+ if (qos->max_nodes_pj == NO_VAL)
+ qos->max_nodes_pj = INFINITE;
+ if (qos->max_submit_jobs_pu == NO_VAL)
+ qos->max_submit_jobs_pu = INFINITE;
+ if (qos->max_wall_pj == NO_VAL)
+ qos->max_wall_pj = INFINITE;
+ if (qos->preempt_mode == (uint16_t)NO_VAL)
+ qos->preempt_mode = (uint16_t)INFINITE;
+ if (qos->usage_factor == (double)NO_VAL)
+ qos->usage_factor = (double)INFINITE;
+ if (qos->usage_thres == (double)NO_VAL)
+ qos->usage_thres = (double)INFINITE;
+ }
+
if (qos->description) {
xstrcat(*cols, ", description");
xstrfmtcat(*vals, ", '%s'", qos->description);
@@ -321,7 +366,7 @@ static int _setup_qos_limits(slurmdb_qos_rec_t *qos,
xfree(preempt_val);
}
- if ((qos->usage_factor != (int16_t)NO_VAL)
+ if ((qos->preempt_mode != (uint16_t)NO_VAL)
&& ((int16_t)qos->preempt_mode >= 0)) {
qos->preempt_mode &= (~PREEMPT_MODE_GANG);
xstrcat(*cols, ", preempt_mode");
@@ -396,7 +441,8 @@ extern int as_mysql_add_qos(mysql_conn_t *mysql_conn, uint32_t uid,
now, now, object->name);
xstrfmtcat(extra, ", mod_time=%ld", now);
- _setup_qos_limits(object, &cols, &vals, &extra, &added_preempt);
+ _setup_qos_limits(object, &cols, &vals,
+ &extra, &added_preempt, 1);
if (added_preempt) {
object->preempt_bitstr = bit_alloc(g_qos_count);
bit_unfmt(object->preempt_bitstr, added_preempt+1);
@@ -545,7 +591,8 @@ extern List as_mysql_modify_qos(mysql_conn_t *mysql_conn, uint32_t uid,
xstrcat(extra, ")");
}
- _setup_qos_limits(qos, &tmp_char1, &tmp_char2, &vals, &added_preempt);
+ _setup_qos_limits(qos, &tmp_char1, &tmp_char2,
+ &vals, &added_preempt, 0);
if (added_preempt) {
preempt_bitstr = bit_alloc(g_qos_count);
bit_unfmt(preempt_bitstr, added_preempt+1);
5 src/plugins/select/bluegene/plugin/dynamic_block.c
View
@@ -75,6 +75,10 @@ extern List create_dynamic_block(List block_list,
}
memset(&blockreq, 0, sizeof(blockreq_t));
+ /* We need to lock this just incase a blocks_overlap is called
+ which will in turn reset and set the system as it sees fit.
+ */
+ slurm_mutex_lock(&block_state_mutex);
if (my_block_list) {
reset_ba_system(track_down_nodes);
itr = list_iterator_create(my_block_list);
@@ -391,6 +395,7 @@ extern List create_dynamic_block(List block_list,
finished:
reset_all_removed_bps();
+ slurm_mutex_unlock(&block_state_mutex);
xfree(unusable_nodes);
xfree(request->save_name);
8 src/sacctmgr/file_functions.c
View
@@ -217,10 +217,14 @@ static void _destroy_sacctmgr_file_opts(void *object)
xfree(file_opts->name);
xfree(file_opts->org);
xfree(file_opts->part);
- if (file_opts->qos_list)
+ if (file_opts->qos_list) {
list_destroy(file_opts->qos_list);
- if (file_opts->wckey_list)
+ file_opts->qos_list = NULL;
+ }
+ if (file_opts->wckey_list) {
list_destroy(file_opts->wckey_list);
+ file_opts->wckey_list = NULL;
+ }
xfree(file_opts);
}
}
2  src/sacctmgr/qos_functions.c
View
@@ -574,6 +574,7 @@ extern int sacctmgr_add_qos(int argc, char *argv[])
qos = NULL;
if(!sacctmgr_find_qos_from_list(g_qos_list, name)) {
qos = xmalloc(sizeof(slurmdb_qos_rec_t));
+ slurmdb_init_qos_rec(qos, 0);
qos->name = xstrdup(name);
if(start_qos->description)
qos->description =
@@ -601,6 +602,7 @@ extern int sacctmgr_add_qos(int argc, char *argv[])
qos->priority = start_qos->priority;
qos->usage_factor = start_qos->usage_factor;
+ qos->usage_thres = start_qos->usage_thres;
xstrfmtcat(qos_str, " %s\n", name);
list_append(qos_list, qos);
Please sign in to comment.
Something went wrong with that request. Please try again.