From c86611684f06ea89f06bc05457fe360853454e7f Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Thu, 28 Jun 2007 23:53:47 +0000 Subject: [PATCH] svn merge -r11740:11767 https://eris.llnl.gov/svn/slurm/branches/slurm-1.2 --- BUILD.NOTES | 2 + META | 4 +- NEWS | 6 +++ doc/man/man5/slurm.conf.5 | 45 +++++++------------ .../slurm_protocol_socket_implementation.c | 2 +- src/plugins/sched/wiki/get_nodes.c | 6 +-- src/plugins/sched/wiki2/get_nodes.c | 6 +-- src/slurmctld/node_mgr.c | 22 +++++---- src/slurmctld/read_config.c | 22 +++++++-- 9 files changed, 65 insertions(+), 50 deletions(-) diff --git a/BUILD.NOTES b/BUILD.NOTES index dd0650508e5..01775b1c0a3 100644 --- a/BUILD.NOTES +++ b/BUILD.NOTES @@ -99,6 +99,8 @@ To build and run on AIX: %_enable_debug "--enable-debug" %with_ssl "--with-ssl=/opt/freeware" %with_munge "--with-munge=/opt/freeware" + Log in to the machine "uP". uP is currently the lowest-common-denominator + AIX machine. CC=/usr/bin/gcc build -s https://eris.llnl.gov/svn/slurm/tags/slurm-1-2-0-0-pre3 4. export MP_RMLIB=./slurm_ll_api.so export CHECKPOINT=yes diff --git a/META b/META index 2f633886e6b..f82b0273f2c 100644 --- a/META +++ b/META @@ -9,8 +9,8 @@ Name: slurm Major: 1 Minor: 2 - Micro: 10 - Version: 1.2.10 + Micro: 11 + Version: 1.2.11 Release: 1 API_CURRENT: 11 API_AGE: 0 diff --git a/NEWS b/NEWS index b8740b75bae..a941cb1db2f 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,10 @@ documents those changes that are of interest to users and admins. -- Removed no-longer-needed jobacct/common/common_slurmctld.c since that is replaced by the database plugin. +* Changes in SLURM 1.2.12 +========================= + -- Increase maximum message size from 1MB to 16MB, from Ernest Artiaga, BSC. + * Changes in SLURM 1.2.11 ========================= -- Updated "etc/mpich1.slurm.patch" for direct srun launch of MPICH1_P4 @@ -44,6 +48,8 @@ documents those changes that are of interest to users and admins. based upon GNU make-3.81. Patch is in "etc/make.slurm.patch". -- Added '-b' option to sbatch for easy MOAB trasition to sbatch instead of srun. Option does nothing in sbatch. + -- Changed wiki2's handling of a node state in Completiting to return 'busy' + instead of 'running' which is already there in slurm1.1 * Changes in SLURM 1.2.10 ========================= diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index b8043a2dd1b..698c2680ce8 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -277,7 +277,7 @@ May not exceed 65533. .TP \fBMessageTimeout\fR Time permitted for a round\-trip communication to complete -in seconds. Default value is 10 seconds. +in seconds. Default value is 5 seconds. .TP \fBMinJobAge\fR @@ -942,7 +942,7 @@ node specifications should be place in this file in consecutive order. No single node name may be listed more than once in the configuration file. Use "DownNodes=" to record the state of nodes which are temporarily -in a DOWN, DRAINED or FAILING state without altering permanent +in a DOWN, DRAIN or FAILING state without altering permanent configuration information. A job step's tasks are allocated to nodes in order the nodes appear in the configuration file. There is presently no capability within @@ -1058,30 +1058,23 @@ The default value is 1. Identifies the reason for a node being in state "DOWN", "DRAINED" "DRAINING", "FAIL" or "FAILING". Use quotes to enclose a reason having more than one word. - .TP \fBState\fR State of the node with respect to the initiation of user jobs. -Acceptable values are "BUSY", "DOWN", "DRAINED", "DRAINING", -"FAIL", "FAILING", "IDLE", and "UNKNOWN". -"BUSY" indicates the node has been allocated work -and should not be used in the configuration file. +Acceptable values are "DOWN", "DRAIN", "FAIL", "FAILING" and "UNKNOWN". "DOWN" indicates the node failed and is unavailable to be allocated work. -"DRAINED" indicates the node was configured unavailable to be -allocated work and is presently not performing any work. -"DRAINING" indicates the node is unavailable to be allocated new -work, but is completing the processing of a job. +"DRAIN" indicates the node is unavailable to be allocated work. "FAIL" indicates the node is expected to fail soon, has no jobs allocated to it, and will not be allocated to any new jobs. "FAILING" indicates the node is expected to fail soon, has one or more jobs allocated to it, but will not be allocated to any new jobs. -"IDLE" indicates the node available to be allocated work, but -has none at present -"UNKNOWN" indicates the node's state is undefined, but will be -established when the \fBslurmd\fR daemon on that node registers. +"UNKNOWN" indicates the node's state is undefined (BUSY or IDLE), +but will be established when the \fBslurmd\fR daemon on that node +registers. The default value is "UNKNOWN". +Also see the \fBDownNodes\fR paramter below. .TP \fBTmpDisk\fR @@ -1113,7 +1106,7 @@ disk space, higher processor speed, etc. Weight is an integer value with a default value of 1. .LP The "DownNodes=" configuration permits you to mark certain nodes as in a -DOWN, DRAINED, FAIL, or FAILING state without altering the permanent +DOWN, DRAIN, FAIL, or FAILING state without altering the permanent configuration information listed under a "NodeName=" specification. .TP @@ -1122,32 +1115,26 @@ Any node name, or list of node names, from the "NodeName=" specifications. .TP \fBReason\fR -Identifies the reason for a node being in state "DOWN", "DRAINED", -"DRAINING", "FAIL" or "FAILING. +Identifies the reason for a node being in state "DOWN", "DRAIN", +"FAIL" or "FAILING. \Use quotes to enclose a reason having more than one word. .TP \fBState\fR State of the node with respect to the initiation of user jobs. -Acceptable values are "BUSY", "DOWN", "DRAINED", "DRAINING", "FAIL", +Acceptable values are "BUSY", "DOWN", "DRAIN", "FAIL", "FAILING, "IDLE", and "UNKNOWN". -"BUSY" indicates the node has been allocated work -and should not be used in the configuration file. "DOWN" indicates the node failed and is unavailable to be allocated work. -"DRAINED" indicates the node was configured unavailable to be -allocated work and is presently not performing any work. -"DRAINING" indicates the node is unavailable to be allocated new -work, but is completing the processing of a job. +"DRAIN" indicates the node is unavailable to be allocated work. "FAIL" indicates the node is expected to fail soon, has no jobs allocated to it, and will not be allocated to any new jobs. "FAILING" indicates the node is expected to fail soon, has one or more jobs allocated to it, but will not be allocated to any new jobs. -"IDLE" indicates the node available to be allocated work, but -has none at present -"UNKNOWN" indicates the node's state is undefined, but will be -established when the \fBslurmd\fR daemon on that node registers. +"UNKNOWN" indicates the node's state is undefined (BUSY or IDLE), +but will be established when the \fBslurmd\fR daemon on that node +registers. The default value is "UNKNOWN". .LP The partition configuration permits you to establish different job diff --git a/src/common/slurm_protocol_socket_implementation.c b/src/common/slurm_protocol_socket_implementation.c index 9341b6af049..b712719544e 100644 --- a/src/common/slurm_protocol_socket_implementation.c +++ b/src/common/slurm_protocol_socket_implementation.c @@ -87,7 +87,7 @@ * Maximum message size. Messages larger than this value (in bytes) * will not be received. */ -#define MAX_MSG_SIZE (1024*1024) +#define MAX_MSG_SIZE (16*1024*1024) /**************************************************************** * MIDDLE LAYER MSG FUNCTIONS diff --git a/src/plugins/sched/wiki/get_nodes.c b/src/plugins/sched/wiki/get_nodes.c index 61ab290ed72..1177bbe7ebf 100644 --- a/src/plugins/sched/wiki/get_nodes.c +++ b/src/plugins/sched/wiki/get_nodes.c @@ -198,12 +198,12 @@ static char * _dump_node(struct node_record *node_ptr, int state_info) static char * _get_node_state(struct node_record *node_ptr) { uint16_t state = node_ptr->node_state; - uint16_t base_state = state & (~NODE_STATE_FLAGS); + uint16_t base_state = state & NODE_STATE_BASE; if (state & NODE_STATE_DRAIN) return "Draining"; if (state & NODE_STATE_COMPLETING) - return "Running"; + return "Busy"; if (base_state == NODE_STATE_DOWN) return "Down"; @@ -212,5 +212,5 @@ static char * _get_node_state(struct node_record *node_ptr) if (base_state == NODE_STATE_IDLE) return "Idle"; - return "Down"; + return "Unknown"; } diff --git a/src/plugins/sched/wiki2/get_nodes.c b/src/plugins/sched/wiki2/get_nodes.c index 9cf1f0d7be7..fda7575eaf1 100644 --- a/src/plugins/sched/wiki2/get_nodes.c +++ b/src/plugins/sched/wiki2/get_nodes.c @@ -227,13 +227,13 @@ static char * _dump_node(struct node_record *node_ptr, int state_info) static char * _get_node_state(struct node_record *node_ptr) { uint16_t state = node_ptr->node_state; - uint16_t base_state = state & (~NODE_STATE_FLAGS); + uint16_t base_state = state & NODE_STATE_BASE; if ((state & NODE_STATE_DRAIN) || (state & NODE_STATE_FAIL)) return "Draining"; if (state & NODE_STATE_COMPLETING) - return "Running"; + return "Busy"; if (base_state == NODE_STATE_DOWN) return "Down"; @@ -242,5 +242,5 @@ static char * _get_node_state(struct node_record *node_ptr) if (base_state == NODE_STATE_IDLE) return "Idle"; - return "Down"; + return "Unknown"; } diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index c523aa538b9..6b9ab02d152 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -394,7 +394,8 @@ _find_alias_node_record (char *name) * load_all_node_state - Load the node state from file, recover on slurmctld * restart. Execute this after loading the configuration file data. * Data goes into common storage. - * IN state_only - if true over-write only node state, features and reason + * IN state_only - if true, overwrite only node state, features and reason + * Use this to overwrite the "UNKNOWN state typically used in slurm.conf * RET 0 or error code * NOTE: READ lock_slurmctld config before entry */ @@ -509,16 +510,21 @@ extern int load_all_node_state ( bool state_only ) xfree(features); xfree(reason); } else if (state_only) { + uint16_t orig_base, orig_flags; + orig_base = node_ptr->node_state & NODE_STATE_BASE; + orig_flags = node_ptr->node_state & NODE_STATE_FLAGS; node_cnt++; - if (node_ptr->node_state == NODE_STATE_UNKNOWN) { + if (orig_base == NODE_STATE_UNKNOWN) { + if (base_state == NODE_STATE_DOWN) { + node_ptr->node_state = NODE_STATE_DOWN + | orig_flags; + } if (node_state & NODE_STATE_DRAIN) - node_ptr->node_state = + node_ptr->node_state |= NODE_STATE_DRAIN; - else if (node_state & NODE_STATE_FAIL) - node_ptr->node_state = + if (node_state & NODE_STATE_FAIL) + node_ptr->node_state |= NODE_STATE_FAIL; - else if (base_state == NODE_STATE_DOWN) - node_ptr->node_state = NODE_STATE_DOWN; } if (node_ptr->reason == NULL) node_ptr->reason = reason; @@ -1500,7 +1506,7 @@ validate_node_specs (char *node_name, uint16_t cpus, set_node_down(node_name, "Prolog failed"); } } else { - if (node_ptr->node_state == NODE_STATE_UNKNOWN) { + if (base_state == NODE_STATE_UNKNOWN) { last_node_update = time (NULL); reset_job_priority(); debug("validate_node_specs: node %s has registered", diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 813f7448b85..2fcf9efd127 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -301,7 +301,7 @@ static int _state_str2int(const char *state_str) } if (i >= NODE_STATE_END) { if (strncasecmp("DRAIN", state_str, 5) == 0) - state_val = NODE_STATE_IDLE | NODE_STATE_DRAIN; + state_val = NODE_STATE_UNKNOWN | NODE_STATE_DRAIN; else if (strncasecmp("FAIL", state_str, 4) == 0) state_val = NODE_STATE_IDLE | NODE_STATE_FAIL; } @@ -815,7 +815,8 @@ int read_slurm_conf(int recover) } -/* Restore node state and size information from saved records */ +/* Restore node state and size information from saved records. + * If a node was re-configured to be down or drained, we set those states */ static void _restore_node_state(struct node_record *old_node_table_ptr, int old_node_record_count) { @@ -823,10 +824,23 @@ static void _restore_node_state(struct node_record *old_node_table_ptr, int i; for (i = 0; i < old_node_record_count; i++) { + uint16_t drain_flag = false, down_flag = false; node_ptr = find_node_record(old_node_table_ptr[i].name); if (node_ptr == NULL) continue; - node_ptr->node_state = old_node_table_ptr[i].node_state; + + if ((node_ptr->node_state & NODE_STATE_BASE) == NODE_STATE_DOWN) + down_flag = true; + if (node_ptr->node_state & NODE_STATE_DRAIN) + drain_flag = true; + node_ptr->node_state = old_node_table_ptr[i].node_state; + if (down_flag) { + node_ptr->node_state &= NODE_STATE_FLAGS; + node_ptr->node_state |= NODE_STATE_DOWN; + } + if (drain_flag) + node_ptr->node_state |= NODE_STATE_DRAIN; + node_ptr->last_response = old_node_table_ptr[i].last_response; node_ptr->cpus = old_node_table_ptr[i].cpus; node_ptr->sockets = old_node_table_ptr[i].sockets; @@ -834,7 +848,7 @@ static void _restore_node_state(struct node_record *old_node_table_ptr, node_ptr->threads = old_node_table_ptr[i].threads; node_ptr->real_memory = old_node_table_ptr[i].real_memory; node_ptr->tmp_disk = old_node_table_ptr[i].tmp_disk; - if(node_ptr->reason == NULL) { + if (node_ptr->reason == NULL) { /* Recover only if not explicitly set in slurm.conf */ node_ptr->reason = old_node_table_ptr[i].reason; old_node_table_ptr[i].reason = NULL; -- GitLab