diff --git a/NEWS b/NEWS index 2e3399a3c0746ac9b785cd1f4062aeea8b818dea..fa1ca87a9f3ab7ef1c8a0f453886e9dfd125c880 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 563eee7444b81832fb65bf89a7eb4430c8eb9c9f..43b852b93731d65c65667559658e6d07a33f7c81 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 705d90535c2770b82fe6c8a0141b4dda99dea49b..fcb62f219ed9b5cff8f407dbc7b8e12885fd38a5 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");