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.
Loading
Please register or sign in to comment