From f680c080ade8cd5a347a56bb39a7fafbbb41295f Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 30 Jun 2009 17:52:14 +0000 Subject: [PATCH] svn merge -r17999:18007 https://eris.llnl.gov/svn/slurm/branches/slurm-2.0 --- NEWS | 4 ++++ src/api/step_launch.c | 7 ++++--- .../mysql/accounting_storage_mysql.c | 20 +++++++++++++------ src/slurmctld/controller.c | 3 +-- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 363f37efd94..552c34f08d7 100644 --- a/NEWS +++ b/NEWS @@ -83,6 +83,10 @@ documents those changes that are of interest to users and admins. socket/core/thread counts. -- Modify select/cons_res to recognize updated memory size upon node startup if FastSchedule=0. + -- Fixed bug if not enforcing associations, but running with them and the + priority/multifactor, the slurmctld will not core dump on processing usage. + -- QOS will not be reset to the default when added back a previously deleted + association. * Changes in SLURM 2.0.3 ======================== diff --git a/src/api/step_launch.c b/src/api/step_launch.c index c36275570a0..58cbfc1512b 100644 --- a/src/api/step_launch.c +++ b/src/api/step_launch.c @@ -491,8 +491,8 @@ void slurm_step_launch_fwd_signal(slurm_step_ctx_t *ctx, int signo) int rc = SLURM_SUCCESS; struct step_launch_state *sls = ctx->launch_state; - debug2("forward signal %d to job", signo); - + debug2("forward signal %d to job %u", signo, ctx->job_id); + /* common to all tasks */ msg.job_id = ctx->job_id; msg.job_step_id = ctx->step_resp->job_step_id; @@ -539,7 +539,8 @@ void slurm_step_launch_fwd_signal(slurm_step_ctx_t *ctx, int signo) req.msg_type = REQUEST_SIGNAL_TASKS; req.data = &msg; - debug3("sending signal to host %s", name); + debug3("sending signal %d to job %u on host %s", + signo, ctx->job_id, name); if (!(ret_list = slurm_send_recv_msgs(name, &req, 0, false))) { error("fwd_signal: slurm_send_recv_msgs really failed bad"); diff --git a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c index 431850f4599..0e98b900a43 100644 --- a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c +++ b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c @@ -622,8 +622,12 @@ static int _setup_association_limits(acct_association_rec_t *assoc, xstrcat(*extra, ", max_wall_duration_per_job=NULL"); } - if((qos_level != QOS_LEVEL_MODIFY) - && assoc->qos_list && list_count(assoc->qos_list)) { + /* when modifying the qos it happens in the actual function + since we have to wait until we hear about the parent first. */ + if(qos_level == QOS_LEVEL_MODIFY) + goto end_qos; + + if(assoc->qos_list && list_count(assoc->qos_list)) { char *qos_type = "qos"; char *qos_val = NULL; char *tmp_char = NULL; @@ -639,12 +643,10 @@ static int _setup_association_limits(acct_association_rec_t *assoc, } xstrfmtcat(qos_val, ",%s", tmp_char); } - - list_iterator_destroy(qos_itr); - - xstrfmtcat(*cols, ", %s", qos_type); + list_iterator_destroy(qos_itr); + xstrfmtcat(*cols, ", %s", qos_type); xstrfmtcat(*vals, ", '%s'", qos_val); xstrfmtcat(*extra, ", %s=\"%s\"", qos_type, qos_val); xfree(qos_val); @@ -653,7 +655,13 @@ static int _setup_association_limits(acct_association_rec_t *assoc, xstrcat(*cols, ", qos"); xstrfmtcat(*vals, ", '%s'", default_qos_str); xstrfmtcat(*extra, ", qos=\"%s\"", default_qos_str); + } else { + /* clear the qos */ + xstrcat(*cols, ", qos, delta_qos"); + xstrcat(*vals, ", '', ''"); + xstrcat(*extra, ", qos=\"\", delta_qos=\"\""); } +end_qos: return SLURM_SUCCESS; diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index b967294cc71..0525daec34b 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -1105,8 +1105,7 @@ static void _remove_assoc(acct_association_rec_t *rec) { int cnt = 0; - if (accounting_enforce & ACCOUNTING_ENFORCE_ASSOCS) - cnt = job_cancel_by_assoc_id(rec->id); + cnt = job_cancel_by_assoc_id(rec->id); if (cnt) { info("Removed association id:%u user:%s, cancelled %u jobs", -- GitLab