From 829285f860d6bd9589b537b3b55a6d7441cc336f Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Thu, 12 Nov 2009 23:48:57 +0000 Subject: [PATCH] Added -R option to slurmctld to recover partition state also when restarting or reconfiguring. --- NEWS | 4 +++- doc/man/man8/slurmctld.8 | 7 +++++++ src/slurmctld/controller.c | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 2e3399a3c07..fa1ca87a9f3 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,9 @@ documents those changes that are of interest to users and admins. after a running prolog has finished. -- If a node reboots inbetween checking status the node is marked down unless ReturnToService=2 - + -- Added -R option to slurmctld to recover partition state also when + restarting or reconfiguring. + * Changes in SLURM 2.1.0-pre6 ============================= -- When getting information about nodes in hidden partitions, return a node diff --git a/doc/man/man8/slurmctld.8 b/doc/man/man8/slurmctld.8 index 563eee7444b..43b852b9373 100644 --- a/doc/man/man8/slurmctld.8 +++ b/doc/man/man8/slurmctld.8 @@ -30,6 +30,13 @@ Help; print a brief summary of command options. \fB\-L <file>\fR Write log messages to the specified file. .TP +\fB\-R\fR +Recover full state from last checkpoint. Normally the slurmctld will +only recover information about job, and node information. With this +option state will be recovered for partition information +also. (Warning: When using this option any changes to partitions in the +slurm.conf file will be ignored on next restart or reconfig.) +.TP \fB\-v\fR Verbose operation. Multiple \fB\-v\fR's increase verbosity. .TP diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 705d90535c2..fcb62f219ed 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -1468,7 +1468,7 @@ static void _parse_commandline(int argc, char *argv[]) int c = 0; opterr = 0; - while ((c = getopt(argc, argv, "cdDf:hL:rvV")) != -1) + while ((c = getopt(argc, argv, "cdDf:hL:rRvV")) != -1) switch (c) { case 'c': recover = 0; @@ -1494,6 +1494,10 @@ static void _parse_commandline(int argc, char *argv[]) recover = 1; bg_recover = 1; break; + case 'R': + recover = 2; + bg_recover = 1; + break; case 'v': debug_level++; break; @@ -1533,6 +1537,9 @@ static void _usage(char *prog_name) #if (DEFAULT_RECOVER == 0) fprintf(stderr, " -r " "\tRecover state from last checkpoint.\n"); +#else + fprintf(stderr, " -R " + "\tRecover full state from last checkpoint.\n"); #endif fprintf(stderr, " -v " "\tVerbose mode. Multiple -v's increase verbosity.\n"); -- GitLab