From bdd9bca43b3fcdd236e69676f4307b7a4625a397 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Tue, 17 Jan 2017 16:37:08 -0700 Subject: [PATCH] Improve error handling Improve logic from commit 1f8e8c9feddd2 --- src/plugins/sched/backfill/backfill.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index b64b5abe4b7..be27f727769 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -1532,14 +1532,18 @@ next_task: /* Unable to start job using currently currently active * features, need to use features which can be made * available after node reboot */ - bitstr_t *tmp_bitmap = NULL; - FREE_NULL_BITMAP(exc_core_bitmap); + bitstr_t *tmp_core_bitmap = NULL; + bitstr_t *tmp_node_bitmap = NULL; /* Determine impact of any advance reservations */ j = job_test_resv(job_ptr, &start_res, true, - &tmp_bitmap, &exc_core_bitmap, + &tmp_node_bitmap, &tmp_core_bitmap, &resv_overlap, true); - bit_and(avail_bitmap, tmp_bitmap); - FREE_NULL_BITMAP(tmp_bitmap); + if (j == SLURM_SUCCESS) { + FREE_NULL_BITMAP(exc_core_bitmap); + exc_core_bitmap = tmp_core_bitmap; + bit_and(avail_bitmap, tmp_node_bitmap); + FREE_NULL_BITMAP(tmp_node_bitmap); + } boot_time = node_features_g_boot_time(); j = _try_sched(job_ptr, &avail_bitmap, min_nodes, max_nodes, req_nodes, exc_core_bitmap); -- GitLab