Skip to content

Commit 0b12b76

Browse files
committed
job-exec: fix confusing "job shell exec error" log message
Problem: When the job-exec module detects an exec error for a job shell it emits a confusing error message that includes either the path to the job shell or the IMP (if a multiuser job), and only the result of `strerror()` for the errno returned from libsubprocess. When using sdexec, this errno is always `ENOENT`, resulting in a confusing error message that seems to indicate that `flux-imp` was not found. It is unhelpful to include `argv[0]` in this error message. It will always be the job shell or the IMP and we all know it. Drop this from the log message. Also, sdexec will provide extra information in the subprocess error string available from `flux_subprocess_fail_error (p)`. Log this instead of `strerror (errno)`. Fixes #6568
1 parent bada44d commit 0b12b76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/job-exec/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,12 @@ static void error_cb (struct bulk_exec *exec, flux_subprocess_t *p, void *arg)
379379
}
380380
else {
381381
jobinfo_fatal_error (job,
382-
errnum,
382+
0,
383383
"%s on broker %s (rank %d): %s",
384384
"job shell exec error",
385385
hostname,
386386
rank,
387-
flux_cmd_arg (cmd, 0));
387+
flux_subprocess_fail_error (p));
388388
}
389389
}
390390
else

0 commit comments

Comments
 (0)