Commit 61989624 authored by Morris Jette's avatar Morris Jette
Browse files

Prevent resetting schedloglevel if no logfile defined

If there is no SchedLogfile defined and 'scontrol schedloglevel 1'
is issued from an administrator, slurmctld will segfault at the
next "sched: " log message due to NULL log file pointer. There
are obviously multiple ways to fix this issue, but in this patch
the RPC simply returns and "Operation Disabled" error immediately
if the sched log file is NULL.

Other options include opening a new logfile with a default name,
sending sched log messages to stderr, or enhancing the scontrol
interface to allow specifying a logfile name for the schedlog.

There are other cases in the schedlog code that could cause problems
for the slurmctld, but since the sched log stuff is tied in strangely
with the rest of the logging code, I didn't want to try modifying
anything in log.c, for fear of breaking the normal logging functions.
Patch from Mark Grondona, LLNL.
parent 05b59105
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment