From 3a61b6d7c11aba89fc547f9d766efe38f037fdf9 Mon Sep 17 00:00:00 2001 From: cmoussa1 Date: Fri, 27 Sep 2024 11:47:17 -0700 Subject: [PATCH] job.state.inactive: add return -1 to exception Problem: The callback for job.state.inactive does not return -1 in the event of an exception being raised due to failing to remove a dependency from a held job for an association. Add a "return -1" call after flux_jobtap_raise_exception () in the callback for job.state.inactive. --- src/plugins/mf_priority.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/mf_priority.cpp b/src/plugins/mf_priority.cpp index 3b295227..e9d65ca4 100644 --- a/src/plugins/mf_priority.cpp +++ b/src/plugins/mf_priority.cpp @@ -1138,8 +1138,11 @@ static int inactive_cb (flux_plugin_t *p, if (flux_jobtap_dependency_remove (p, jobid, "max-running-jobs-user-limit") < 0) + { flux_jobtap_raise_exception (p, jobid, "mf_priority", 0, "failed to remove job dependency"); + return -1; + } b->held_jobs.erase (b->held_jobs.begin ()); }