As discussed in previous messages in this thread, here is a patch to SLURM
2.3.1 "src/slurmctld/controller.c" to eliminate the SlurmctldLogFile path
as the location of the core file dump and just set the location to the
SlurmStateSave directory, if slurmctld is running as a daemon. The patch
should also apply to SLURM 2.4.0 (with a one-line relocation).
Index: slurm/src/slurmctld/controller.c
===================================================================
RCS file: /cvsroot/slurm/slurm/src/slurmctld/controller.c,v
retrieving revision 1.1.1.61
diff -u -r1.1.1.61 controller.c
--- slurm/src/slurmctld/controller.c 25 Oct 2011 18:17:21 -0000
1.1.1.61
+++ slurm/src/slurmctld/controller.c 1 Nov 2011 20:31:26 -0000
@@ -255,23 +255,9 @@
slurmctld_conf.sched_logfile);
debug("sched: slurmctld starting");
- if (slurmctld_conf.slurmctld_logfile &&
- (slurmctld_conf.slurmctld_logfile[0] == '/')) {
- char *slash_ptr, *work_dir;
- work_dir =
xstrdup(slurmctld_conf.slurmctld_logfile);
- slash_ptr = strrchr(work_dir, '/');
- if (slash_ptr == work_dir)
- work_dir[1] = '\0';
- else
- slash_ptr[0] = '\0';
- if (chdir(work_dir) < 0)
- fatal("chdir(%s): %m", work_dir);
- xfree(work_dir);
- } else {
- if (chdir(slurmctld_conf.state_save_location) < 0)
{
- fatal("chdir(%s): %m",
- slurmctld_conf.state_save_location);
- }
+ if (chdir(slurmctld_conf.state_save_location) < 0) {
+ fatal("chdir(%s): %m",
+ slurmctld_conf.state_save_location);
}
} else {
slurmctld_config.daemonize = 0;
And here is a patch for the "doc/man/man8/slurmctld.8" man page to
document the change. It should apply to both 2.3.1 and 2.4.0.
Index: slurm/doc/man/man8/slurmctld.8
===================================================================
RCS file: /cvsroot/slurm/slurm/doc/man/man8/slurmctld.8,v
retrieving revision 1.1.1.17
diff -u -r1.1.1.17 slurmctld.8
--- slurm/doc/man/man8/slurmctld.8 29 Aug 2011 16:31:12 -0000
1.1.1.17
+++ slurm/doc/man/man8/slurmctld.8 1 Nov 2011 20:31:51 -0000
@@ -73,10 +73,9 @@
.SH "CORE FILE LOCATION"
If slurmctld is started with the \fB\-D\fR option then the core file will
be
written to the current working directory.
-Otherwise if \fBSlurmctldLogFile\fR is a fully qualified path name
(starting
-with a slash), the core file will be written to the same directory as the
-log file.
Otherwise the core file will be written to the \fBStateSaveLocation\fR.
+SlurmUser must have permission to create files in the
\fBStateSaveLocation\fR
+directory for a core file to be produced.
The command "scontrol abort" can be used to abort the slurmctld daemon
and
generate a core file.
Tested on both 2.3.1 and 2.4.0-rc3.
-Don Albert-