diff --git a/NEWS b/NEWS index 64198d10d0c88360dd2f67b3f84e142d7886e59e..3fda9d30adefd9ca5dfa29c888c3535f72f1bdee 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ documents those changes that are of interest to users and administrators. job resource allocation time. -- Disable the OOM Killer in slurmd and slurmstepd's memory cgroup when using MemSpecLimit. + -- Add scontrol options to view and modify layouts tables. * Changes in Slurm 15.08.0pre4 ============================== diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 0baf8f5e31e0bffa4c3c5490dd71b7f9247076ff..edcdf4994b8f8b3ca1109f35b48cc10f9571117c 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -163,6 +163,7 @@ COMMAND CHANGES (see man pages for details) -- Introduce new sbatch option '--kill-on-invalid-dep=yes|no' which allows users to specify which behavior they want if a job dependency is not satisfied. + -- Add scontrol options to view and modify layouts tables. OTHER CHANGES ============= @@ -228,7 +229,8 @@ Changed the following enums and #defines Added the following API's ========================= - + -- Added APIs to load, print, and update layouts: + slurm_print_layout_info, slurm_load_layout, slurm_update_layout. Changed the following API's ============================ diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 39d74824c283f8e41224b92ad7d01b40e65592ff..8adaf331c5edd4b8c8ecf70c8f4971ead1064d8a 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1482,8 +1482,8 @@ Identify the entities to be updated. This specification is required. .TP \fIKey\fP=<value> Keys/Values to update for the entities. The format must respect the layout.d -configuration files. Key=Type cannot be updated. One Key/Value is required, -several can be set. +configuration files. Key=Type cannot be updated. At least one Key/Value is +required, several can be set. .TP \fBSPECIFICATIONS FOR SHOW COMMAND, LAYOUTS\fR diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 30677c08c199de4422d769b28413f50a423b25c9..1e3219973b21a045abcb49dd833310f50aa2b29b 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1853,8 +1853,8 @@ typedef struct job_alloc_info_msg { } job_alloc_info_msg_t; typedef struct layout_info_msg { - uint32_t record_count; /* number of char* */ - char** records; /*layout or list of layouts*/ + uint32_t record_count; /* number of char* */ + char** records; /* layout or list of layouts */ } layout_info_msg_t; typedef struct update_layout_msg { @@ -4001,11 +4001,15 @@ extern int slurm_delete_partition PARAMS((delete_part_msg_t * part_msg)); \*****************************************************************************/ extern void slurm_print_layout_info PARAMS( (FILE* out, layout_info_msg_t *layout_info_ptr, int one_liner )); + extern int slurm_load_layout PARAMS( (char *layout_type, char *entities, char *type, - uint32_t norelation, layout_info_msg_t **resp)); + uint32_t no_relation, layout_info_msg_t **resp)); + extern int slurm_update_layout PARAMS((update_layout_msg_t * layout_info_msg)); +extern void slurm_free_layout_info_msg PARAMS( + (layout_info_msg_t * layout_info_msg)); /*****************************************************************************\ * SLURM RESERVATION CONFIGURATION READ/PRINT/UPDATE FUNCTIONS diff --git a/src/api/Makefile.am b/src/api/Makefile.am index 8a477cb88eeba951b4da626d3d586bc0f2b54180..461d8f939778cb7f2a07be162e1383d2e86fead6 100644 --- a/src/api/Makefile.am +++ b/src/api/Makefile.am @@ -92,9 +92,9 @@ slurmapi_src = \ init_msg.c \ job_info.c \ job_step_info.c \ + layout_info.c \ license_info.c \ node_info.c \ - layout_info.c \ partition_info.c \ pmi_server.c \ pmi_server.h \ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index f014148ab9c7c512b05c7a63d73c42eb0f1b746a..a0e3afbb9a5bc8134fcb38c4469305dd3e9f1e91 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -188,8 +188,8 @@ libslurmhelper_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = allocate.lo allocate_msg.lo block_info.lo \ burst_buffer_info.lo cache_info.lo cancel.lo checkpoint.lo \ complete.lo config_info.lo front_end_info.lo init_msg.lo \ - job_info.lo job_step_info.lo license_info.lo node_info.lo \ - layout_info.lo partition_info.lo pmi_server.lo \ + job_info.lo job_step_info.lo layout_info.lo license_info.lo \ + node_info.lo partition_info.lo pmi_server.lo \ reservation_info.lo signal.lo slurm_get_statistics.lo \ slurm_hostlist.lo slurm_pmi.lo step_ctx.lo step_io.lo \ step_launch.lo submit.lo suspend.lo topo_info.lo triggers.lo \ @@ -598,9 +598,9 @@ slurmapi_src = \ init_msg.c \ job_info.c \ job_step_info.c \ + layout_info.c \ license_info.c \ node_info.c \ - layout_info.c \ partition_info.c \ pmi_server.c \ pmi_server.h \ diff --git a/src/api/layout_info.c b/src/api/layout_info.c index 95855e7eed4db982f8e70c0df199cfa6149361c1..070a8086fc6e0084bf27b4e711394a02e95990c1 100644 --- a/src/api/layout_info.c +++ b/src/api/layout_info.c @@ -71,12 +71,12 @@ }*/ extern int slurm_load_layout (char *layout_type, char *entities, char *type, - uint32_t norelation, layout_info_msg_t **resp) + uint32_t no_relation, layout_info_msg_t **resp) { - int rc; - slurm_msg_t req_msg; - slurm_msg_t resp_msg; - layout_info_request_msg_t req; + int rc; + slurm_msg_t req_msg; + slurm_msg_t resp_msg; + layout_info_request_msg_t req; slurm_msg_t_init(&req_msg); slurm_msg_t_init(&resp_msg); @@ -84,9 +84,9 @@ extern int slurm_load_layout (char *layout_type, char *entities, char *type, req.layout_type = layout_type; req.entities = entities; req.type = type; - req.norelation = norelation; - req_msg.msg_type = REQUEST_LAYOUT_INFO; - req_msg.data = &req; + req.no_relation = no_relation; + req_msg.msg_type = REQUEST_LAYOUT_INFO; + req_msg.data = &req; if (slurm_send_recv_controller_msg(&req_msg, &resp_msg) < 0) return SLURM_ERROR; @@ -118,6 +118,6 @@ void slurm_print_layout_info ( FILE* out, layout_info_msg_t *layout_info_ptr, //FIXME change "\n" if one_liner fprintf ( out, "%s", layout_info_ptr->records[i]); } - if ( !one_liner) + if (!one_liner) fprintf(out, "\n"); } diff --git a/src/common/layouts_mgr.c b/src/common/layouts_mgr.c index 0b2c24529ed30b1070c8b6fbf716bfd743a711d7..025d7d1f3daced3e432d6cbe4dbd9c295ca79d9c 100644 --- a/src/common/layouts_mgr.c +++ b/src/common/layouts_mgr.c @@ -1586,7 +1586,7 @@ typedef struct _pack_args { hostlist_t list_entities; char *type; uint32_t all; - uint32_t norelation; + uint32_t no_relation; } _pack_args_t; /* @@ -1699,7 +1699,7 @@ static uint8_t _pack_layout_tree(xtree_node_t* node, uint8_t which, hostlist_t enclosed; char *enclosed_str = NULL, *e_name = NULL, *e_type = NULL; Buf buffer; - char *strdump, *str; + char *strdump, *str = NULL; /* only need to work for preorder and leaf cases */ if (which != XTREE_PREORDER && which != XTREE_LEAF) { @@ -1735,15 +1735,14 @@ static uint8_t _pack_layout_tree(xtree_node_t* node, uint8_t which, if (!enode || !enode->entity) { e_name = (char*) "NULL"; e_type = NULL; - } - else { + } else { e_name = enode->entity->name; e_type = enode->entity->type; } /* print this entity as root if necessary */ - if (level == 0 && pargs->norelation != 1 && pargs->type == NULL) { - if( pargs->all != 0 || + if (level == 0 && pargs->no_relation != 1 && pargs->type == NULL) { + if (pargs->all != 0 || pargs->list_entities == NULL || hostlist_find(pargs->list_entities, e_name) != -1) { str = xstrdup_printf("Root=%s\n", e_name); @@ -1770,8 +1769,8 @@ static uint8_t _pack_layout_tree(xtree_node_t* node, uint8_t which, str = pargs->current_line; pargs->current_line = NULL; - /*don't print enclosed if norelation option*/ - if( pargs->norelation == 1 + /* don't print enclosed if no_relation option */ + if (pargs->no_relation == 1 && enclosed_str != NULL && pargs->list_entities == NULL) { xfree(enclosed_str); @@ -1779,24 +1778,24 @@ static uint8_t _pack_layout_tree(xtree_node_t* node, uint8_t which, return 1; } - /*don't print non enclosed if no "entities char*" option*/ - if( pargs->all == 0 + /* don't print non enclosed if no "entities char*" option */ + if (pargs->all == 0 && pargs->list_entities == NULL && enclosed_str == NULL ) { xfree(str); return 1; } - /*don't print entities if not named in "entities char*"*/ - if( pargs->all == 0 + /* don't print entities if not named in "entities char*" */ + if (pargs->all == 0 && pargs->list_entities != NULL && hostlist_find(pargs->list_entities, e_name) == -1) { xfree(str); return 1; } - /*don't print entities if not type of "type char*"*/ - if( pargs->type != NULL + /* don't print entities if not type of "type char*" */ + if (pargs->type != NULL && (e_type == NULL || strcasecmp(e_type,pargs->type)!=0)) { xfree(str); return 1; @@ -1813,8 +1812,8 @@ static uint8_t _pack_layout_tree(xtree_node_t* node, uint8_t which, } packstr(str, buffer); - xfree(str); + return 1; } @@ -2524,7 +2523,7 @@ entity_t* layouts_get_entity(const char* name) int layouts_pack_layout(char *l_type, char *char_entities, char *type, - uint32_t norelation, Buf buffer) + uint32_t no_relation, Buf buffer) { _pack_args_t pargs; layout_t* layout; @@ -2550,10 +2549,10 @@ int layouts_pack_layout(char *l_type, char *char_entities, char *type, pargs.list_entities = hostlist_create(char_entities); } pargs.type = type; - pargs.norelation = norelation; + pargs.no_relation = no_relation; - if ( pargs.norelation == 0 + if ( pargs.no_relation == 0 && pargs.list_entities == NULL && pargs.type == NULL ) { /* start by packing the layout priority */ diff --git a/src/common/layouts_mgr.h b/src/common/layouts_mgr.h index d505153cd9fc0032c82191869c6fd76626a669db..40db1ee6e8c73c7dbaf06d5ba9d8be892b541931 100644 --- a/src/common/layouts_mgr.h +++ b/src/common/layouts_mgr.h @@ -189,7 +189,7 @@ entity_t* layouts_get_entity(const char* name); * Return SLURM_SUCCES or SLURM_ERROR in case of failure */ int layouts_pack_layout(char *l_type, char *entities, char *type, - uint32_t norelation, Buf buffer); + uint32_t no_relation, Buf buffer); /* * layouts_update_layout - update a particular layout loading the information diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index 2eca97bc03e8cf46b48c471a9af2b3792a0b8296..5a04a26fe8565d24a506c0bb6103a64eb3cdc548 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -861,7 +861,7 @@ extern void slurm_free_layout_info_request_msg(layout_info_request_msg_t * msg) extern void slurm_free_layout_info_msg(layout_info_msg_t * msg) { int i; - for (i=0; i<msg->record_count; i++) + for (i = 0; i < msg->record_count; i++) xfree(msg->records[i]); xfree(msg->records); xfree(msg); diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 5c8f7bc84b37652d865dc31dc09818f130c5e9f0..7ea40289a8a2f462d3f144694f47cbeda71db9e0 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -586,10 +586,10 @@ typedef struct resv_info_request_msg { } resv_info_request_msg_t; typedef struct layout_info_request_msg { - char* layout_type; - char* entities; - char* type; - uint32_t norelation; + char* layout_type; + char* entities; + char* type; + uint32_t no_relation; } layout_info_request_msg_t; typedef struct complete_job_allocation { diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 27c1ee84f4620a556e80b4bf39ef9ce887eb26aa..f8c0166534d1577bff8d822db90726169f534935 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -2940,13 +2940,13 @@ _pack_update_layout_msg(update_layout_msg_t * msg, Buf buffer, { xassert(msg != NULL); - /*if (protocol_version >= SLURM_15_08_PROTOCOL_VERSION) {*/ + if (protocol_version >= SLURM_15_08_PROTOCOL_VERSION) { packstr(msg->layout, buffer); packstr(msg->arg, buffer); - /*} else { - error("_pack_update_node_msg: protocol_version " - "%hu not supported", protocol_version); - }*/ + } else { + error("%s: protocol_version %hu not supported", + __func__, protocol_version); + } } static int _unpack_update_layout_msg(update_layout_msg_t ** msg, Buf buffer, @@ -2960,16 +2960,16 @@ static int _unpack_update_layout_msg(update_layout_msg_t ** msg, Buf buffer, tmp_ptr = xmalloc(sizeof(update_layout_msg_t)); *msg = tmp_ptr; - /*if (protocol_version >= SLURM_15_08_PROTOCOL_VERSION) {*/ + if (protocol_version >= SLURM_15_08_PROTOCOL_VERSION) { safe_unpackstr_xmalloc(&tmp_ptr->layout, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&tmp_ptr->arg, &uint32_tmp, buffer); - /*} else { - error("_unpack_update_layout_msg: protocol_version " - "%hu not supported", protocol_version); + } else { + error("%s: protocol_version %hu not supported", + __func__, protocol_version); goto unpack_error; - }*/ + } return SLURM_SUCCESS; unpack_error: @@ -4976,32 +4976,32 @@ _unpack_layout_info_msg(layout_info_msg_t ** msg, Buf buffer, xmalloc(sizeof(char*) * base_buffer_size); (*msg)->record_count = base_buffer_size; - i=0; + i = 0; while (remaining_buf(buffer) > 0) { safe_unpackstr_xmalloc(&tmp_str, &utmp32, buffer); if (tmp_str != NULL) { - if (*tmp_str == '\0') { - xfree(tmp_str); - break; - } - if (i == (*msg)->record_count) { - (*msg)->record_count - += base_buffer_size; - xrealloc(records, - sizeof(char*) * - (*msg)->record_count); - } - records[i] = tmp_str; - ++i; - //xfree(tmp_str); - continue; + if (*tmp_str == '\0') { + xfree(tmp_str); + break; + } + if (i == (*msg)->record_count) { + (*msg)->record_count + += base_buffer_size; + records = xrealloc(records, + sizeof(char*) * + (*msg)->record_count); + } + records[i] = tmp_str; + ++i; + //xfree(tmp_str); + continue; } } (*msg)->record_count = i; xrealloc(records, sizeof(char*) * (*msg)->record_count); } else { - error("_unpack_reserve_layout_msg: protocol_version " - "%hu not supported", protocol_version); + error("%s: protocol_version %hu not supported", + __func__, protocol_version); goto unpack_error; } return SLURM_SUCCESS; @@ -10858,7 +10858,7 @@ _pack_layout_info_request_msg(layout_info_request_msg_t * msg, Buf buffer, packstr(msg->layout_type, buffer); packstr(msg->entities, buffer); packstr(msg->type, buffer); - pack32(msg->norelation, buffer); + pack32(msg->no_relation, buffer); } static int @@ -10874,7 +10874,7 @@ _unpack_layout_info_request_msg(layout_info_request_msg_t ** msg, Buf buffer, safe_unpackstr_xmalloc(&layout_info->layout_type, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&layout_info->entities, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&layout_info->type, &uint32_tmp, buffer); - safe_unpack32(&layout_info->norelation, buffer); + safe_unpack32(&layout_info->no_relation, buffer); return SLURM_SUCCESS; unpack_error: diff --git a/src/scontrol/Makefile.am b/src/scontrol/Makefile.am index 51f7c42be86e4de432c59e911ea71636c6fe38e9..aec33501ef6c5239c187acbf0d10dba6119ce05c 100644 --- a/src/scontrol/Makefile.am +++ b/src/scontrol/Makefile.am @@ -12,18 +12,18 @@ scontrol_SOURCES = \ info_burst_buffer.c \ info_cache.c \ info_job.c \ + info_layout.c \ info_lics.c \ info_node.c \ info_part.c \ info_res.c \ - info_layout.c \ scontrol.c \ scontrol.h \ update_job.c \ + update_layout.c \ update_node.c \ update_part.c \ - update_step.c \ - update_layout.c + update_step.c convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 61276e4e991a2fb3dc2c2a74ef470002551f30b2..5d9ccfe9b2981ff9eadd20b2b306d5caa48b089c 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -139,11 +139,11 @@ am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_scontrol_OBJECTS = create_res.$(OBJEXT) info_block.$(OBJEXT) \ info_burst_buffer.$(OBJEXT) info_cache.$(OBJEXT) \ - info_job.$(OBJEXT) info_lics.$(OBJEXT) info_node.$(OBJEXT) \ - info_part.$(OBJEXT) info_res.$(OBJEXT) info_layout.$(OBJEXT) \ - scontrol.$(OBJEXT) update_job.$(OBJEXT) update_node.$(OBJEXT) \ - update_part.$(OBJEXT) update_step.$(OBJEXT) \ - update_layout.$(OBJEXT) + info_job.$(OBJEXT) info_layout.$(OBJEXT) info_lics.$(OBJEXT) \ + info_node.$(OBJEXT) info_part.$(OBJEXT) info_res.$(OBJEXT) \ + scontrol.$(OBJEXT) update_job.$(OBJEXT) \ + update_layout.$(OBJEXT) update_node.$(OBJEXT) \ + update_part.$(OBJEXT) update_step.$(OBJEXT) scontrol_OBJECTS = $(am_scontrol_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(top_builddir)/src/api/libslurm.o \ @@ -471,18 +471,18 @@ scontrol_SOURCES = \ info_burst_buffer.c \ info_cache.c \ info_job.c \ + info_layout.c \ info_lics.c \ info_node.c \ info_part.c \ info_res.c \ - info_layout.c \ scontrol.c \ scontrol.h \ update_job.c \ + update_layout.c \ update_node.c \ update_part.c \ - update_step.c \ - update_layout.c + update_step.c convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm scontrol_LDADD = \ diff --git a/src/scontrol/info_layout.c b/src/scontrol/info_layout.c index 11c8e6355f01e0ff5bd847dfdd80bb330ec50d33..b2ba7e99781332c67aa3f3147505d7c6721cffdd 100644 --- a/src/scontrol/info_layout.c +++ b/src/scontrol/info_layout.c @@ -44,10 +44,10 @@ extern void scontrol_print_layout (int argc, char *argv[]) { - int i=0, tag_len = 0; + int i = 0, tag_len = 0; char *tag = NULL, *val = NULL; - char *layout_type=NULL, *entities=NULL, *type=NULL; - uint32_t norelation=0; + char *layout_type = NULL, *entities = NULL, *type = NULL; + uint32_t no_relation = 0; layout_info_msg_t *layout_info_ptr = NULL; while (i < argc) { @@ -64,26 +64,26 @@ scontrol_print_layout (int argc, char *argv[]) } else { val = NULL; } - if (strncasecmp(tag, "layout", MAX(tag_len, 3)) == 0) { + if (strncasecmp(tag, "layouts", MAX(tag_len, 3)) == 0) { layout_type = val; - } else if (strncasecmp (tag, "entity", MAX(tag_len, 5)) == 0) { + } else if (strncasecmp (tag, "entity", MAX(tag_len, 3)) == 0) { entities = val; } else if (strncasecmp (tag, "type", MAX(tag_len, 3)) == 0) { type = val; - } else if (strncasecmp (tag, "nolayout", MAX(tag_len, 4)) == 0) { - norelation = 1; + } else if (strncasecmp (tag, "nolayout", MAX(tag_len, 4)) == 0){ + no_relation = 1; } else { exit_code = 1; if (quiet_flag != 1) fprintf (stderr, - "invalid option:%s for layouts \n", + "invalid option for layouts: %s\n", tag); } i++; } if (slurm_load_layout (layout_type, entities, type, - norelation, &layout_info_ptr) + no_relation, &layout_info_ptr) == SLURM_PROTOCOL_SUCCESS) { slurm_print_layout_info ( stdout, layout_info_ptr, one_liner ); } diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c index 66f506488e68b332f48c15d4e9845962cd4373b7..161dda1d426a7d2dd7d744248a16be86ed76fe0a 100644 --- a/src/scontrol/scontrol.c +++ b/src/scontrol/scontrol.c @@ -1466,7 +1466,7 @@ _show_it (int argc, char *argv[]) { char *tag = NULL, *val = NULL; int tag_len = 0; - bool allow_opt=false; + bool allow_opt = false; if (argc < 2) { exit_code = 1; @@ -1477,7 +1477,7 @@ _show_it (int argc, char *argv[]) } if (strncasecmp (argv[1], "layouts", MAX(tag_len, 2)) != 0) - allow_opt=true; + allow_opt = true; if (argc > 3 && allow_opt) { exit_code = 1; @@ -1546,10 +1546,10 @@ _show_it (int argc, char *argv[]) } else if (strncasecmp (tag, "jobs", MAX(tag_len, 1)) == 0 || strncasecmp (tag, "jobid", MAX(tag_len, 1)) == 0 ) { scontrol_print_job (val); + } else if (strncasecmp (tag, "layouts", MAX(tag_len, 2)) == 0) { + scontrol_print_layout(argc-1, argv + 1); } else if (strncasecmp(tag, "licenses", MAX(tag_len, 2)) == 0) { scontrol_print_licenses(val); - } else if (strncasecmp (tag, "layouts", MAX(tag_len, 2)) == 0) { - scontrol_print_layout(argc-1, &argv[1]); } else if (strncasecmp (tag, "nodes", MAX(tag_len, 1)) == 0) { scontrol_print_node_list (val); } else if (strncasecmp (tag, "partitions", MAX(tag_len, 1)) == 0 || @@ -1591,7 +1591,7 @@ _update_it (int argc, char *argv[]) int node_tag = 0, part_tag = 0, job_tag = 0; int block_tag = 0, sub_tag = 0, res_tag = 0; int debug_tag = 0, step_tag = 0, front_end_tag = 0; - int layout_tag=0; + int layout_tag = 0; int jerror_code = SLURM_SUCCESS; /* First identify the entity to update */ @@ -1966,8 +1966,8 @@ scontrol [<OPTION>] [<COMMAND>] \n\ \n\ <ENTITY> may be \"aliases\", \"burstBuffer\", \"config\", \"daemons\", \n\ \"frontend\", \"hostlist\", \"hostlistsorted\", \"hostnames\", \n\ - \"job\", \"node\", \"partition\", \"reservation\", \"slurmd\", \n\ - \"step\", or \"topology\" \n\ + \"job\", \"layouts\", \"node\", \"partition\", \"reservation\", \n\ + \"slurmd\", \"step\", or \"topology\" \n\ (also for BlueGene only: \"block\" or \"submp\"). \n\ \n\ <ID> may be a configuration parameter name, job id, node name, partition \n\ diff --git a/src/scontrol/update_layout.c b/src/scontrol/update_layout.c index acc4b55b2b365d0efe135764384eab32b3ac1f70..b5feff1cc15052cfef13578554ab177744fa7208 100644 --- a/src/scontrol/update_layout.c +++ b/src/scontrol/update_layout.c @@ -47,10 +47,10 @@ extern int scontrol_update_layout (int argc, char *argv[]) { int rc; - int i=0, tag_len = 0; + int i = 0, tag_len = 0; char *tag = NULL, *val = NULL; update_layout_msg_t msg; - char *opt=NULL; + char *opt = NULL; opt = xstrdup_printf(" "); @@ -69,7 +69,7 @@ scontrol_update_layout (int argc, char *argv[]) tag); goto done; } - if (strncasecmp(tag, "Layouts", MAX(tag_len, 2)) == 0) { + if (strncasecmp(tag, "layouts", MAX(tag_len, 2)) == 0) { msg.layout = val; } else if (strncasecmp(tag, "entity", MAX(tag_len, 2)) == 0) { msg.arg = xstrdup_printf("Entity=%s", val); @@ -83,19 +83,19 @@ scontrol_update_layout (int argc, char *argv[]) if (msg.layout == NULL) { exit_code = 1; fprintf (stderr, - "No valide layout name in update command\n"); + "No valid layout name in update command\n"); goto done; } if (msg.arg == NULL) { exit_code = 1; fprintf (stderr, - "No valide layout enity in update command\n"); + "No valid layout enity in update command\n"); goto done; } if ( strlen(opt) <= 1 ) { exit_code = 1; fprintf (stderr, - "No valide upates arguments in update command\n"); + "No valid updates arguments in update command\n"); goto done; } diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 6ab346b8b513f6fc94c8f03fd7332408bf80527a..5e888d401237c7c105438f7a3e55ab3509cce979 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -3956,7 +3956,7 @@ static void _slurm_rpc_layout_show(slurm_msg_t * msg) if ( layouts_pack_layout(layout_req_msg->layout_type, layout_req_msg->entities, layout_req_msg->type, - layout_req_msg->norelation, + layout_req_msg->no_relation, buffer) != SLURM_SUCCESS) { debug2("_slurm_rpc_layout_show, unable to get layout[%s]", layout_req_msg->layout_type);