diff --git a/NEWS b/NEWS index e75ac75488655226f2c90afe989530af4fb424f7..c74d3c3ef5345203027bccfa87e9da0a183523d7 100644 --- a/NEWS +++ b/NEWS @@ -179,6 +179,8 @@ documents those changes that are of interest to users and admins. equivalent options for compatibility with srun. -- Add configuration parameter GetEnvTimeout for use with Moab. See "man slurm.conf" for details. + -- If a partition's node list contains space separators, replace them with + commas for easier parsing. * Changes in SLURM 1.2.22 ========================= diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 61dda118c73f4443585ca5dd524d630e3abb9e97..0555879a49bfc5664c9b7eef6bbad492d033358e 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -301,6 +301,7 @@ use only one core in each physical CPU .B [no]multithread [don't] use extra threads with in-core multi-threading which can benefit communication intensive applications +.TP .B help show this help message .RE diff --git a/src/common/read_config.c b/src/common/read_config.c index 4753e9e1a0bfdd209a49ad0c7934ce6e13f2ada4..6ab206835354051a83989ab8edf924b2d03c2935 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -502,6 +502,13 @@ static int parse_partitionname(void **dest, slurm_parser_enum_t type, if (!s_p_get_string(&p->nodes, "Nodes", tbl) && !s_p_get_string(&p->nodes, "Nodes", dflt)) p->nodes = NULL; + else { + int i; + for (i=0; p->nodes[i]; i++) { + if (p->nodes[i] == ' ') + p->nodes[i] = ','; + } + } if (!s_p_get_boolean(&p->root_only_flag, "RootOnly", tbl) && !s_p_get_boolean(&p->root_only_flag, "RootOnly", dflt)) diff --git a/src/slurmctld/partition_mgr.c b/src/slurmctld/partition_mgr.c index 422cb1ed3a741bc02cc19a32a21179bcbbc99899..40fd18c53f920a29329538642dc0556b52f91bdb 100644 --- a/src/slurmctld/partition_mgr.c +++ b/src/slurmctld/partition_mgr.c @@ -883,12 +883,14 @@ int update_part(update_part_msg_t * part_desc) xfree(part_ptr->allow_uids); if ((strcasecmp(part_desc->allow_groups, "ALL") == 0) || (part_desc->allow_groups[0] == '\0')) { - info("update_part: setting allow_groups to ALL for partition %s", + info("update_part: setting allow_groups to ALL for " + "partition %s", part_desc->name); } else { part_ptr->allow_groups = part_desc->allow_groups; part_desc->allow_groups = NULL; - info("update_part: setting allow_groups to %s for partition %s", + info("update_part: setting allow_groups to %s for " + "partition %s", part_ptr->allow_groups, part_desc->name); part_ptr->allow_uids = _get_groups_members(part_ptr->allow_groups); @@ -900,8 +902,14 @@ int update_part(update_part_msg_t * part_desc) if (part_desc->nodes[0] == '\0') part_ptr->nodes = NULL; /* avoid empty string */ - else + else { + int i; part_ptr->nodes = xstrdup(part_desc->nodes); + for (i=0; part_ptr->nodes[i]; i++) { + if (part_ptr->nodes[i] == ' ') + part_ptr->nodes[i] = ','; + } + } error_code = _build_part_bitmap(part_ptr); if (error_code) { @@ -909,7 +917,7 @@ int update_part(update_part_msg_t * part_desc) part_ptr->nodes = backup_node_list; } else { info("update_part: setting nodes to %s for partition %s", - part_desc->nodes, part_desc->name); + part_ptr->nodes, part_desc->name); xfree(backup_node_list); } }