Skip to content
Snippets Groups Projects
Commit a72573bc authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Merge remote-tracking branch 'origin/slurm-14.11'

parents ce2f448c 637c297d
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,7 @@ documents those changes that are of interest to users and administrators. ...@@ -82,6 +82,7 @@ documents those changes that are of interest to users and administrators.
-- Restore GRES functionality with select/linear plugin. It was broken in -- Restore GRES functionality with select/linear plugin. It was broken in
version 14.03.10. version 14.03.10.
-- Fix bug with GRES having multiple types that can cause slurmctld abort. -- Fix bug with GRES having multiple types that can cause slurmctld abort.
-- Fix squeue issue with not recognizing "localhost" in --nodelist option.
* Changes in Slurm 14.11.1 * Changes in Slurm 14.11.1
========================== ==========================
......
...@@ -87,7 +87,7 @@ static void _parse_long_token( char *token, char *sep, int *field_size, ...@@ -87,7 +87,7 @@ static void _parse_long_token( char *token, char *sep, int *field_size,
bool *right_justify, char **suffix); bool *right_justify, char **suffix);
static void _print_options( void ); static void _print_options( void );
static void _usage( void ); static void _usage( void );
static bool _check_node_names(char *); static bool _check_node_names(hostset_t);
static bool _find_a_host(char *, node_info_msg_t *); static bool _find_a_host(char *, node_info_msg_t *);
/* /*
...@@ -97,7 +97,6 @@ extern void ...@@ -97,7 +97,6 @@ extern void
parse_command_line( int argc, char* argv[] ) parse_command_line( int argc, char* argv[] )
{ {
char *env_val = NULL; char *env_val = NULL;
char *nodes;
bool override_format_env = false; bool override_format_env = false;
int opt_char; int opt_char;
int option_index; int option_index;
...@@ -151,7 +150,6 @@ parse_command_line( int argc, char* argv[] ) ...@@ -151,7 +150,6 @@ parse_command_line( int argc, char* argv[] )
} }
if (getenv("SQUEUE_PRIORITY")) if (getenv("SQUEUE_PRIORITY"))
params.priority_flag = true; params.priority_flag = true;
nodes = NULL;
while ((opt_char = getopt_long(argc, argv, while ((opt_char = getopt_long(argc, argv,
"A:ahi:j::lL:n:M:O:o:p:Pq:R:rs::S:t:u:U:vVw:", "A:ahi:j::lL:n:M:O:o:p:Pq:R:rs::S:t:u:U:vVw:",
long_options, &option_index)) != -1) { long_options, &option_index)) != -1) {
...@@ -299,7 +297,6 @@ parse_command_line( int argc, char* argv[] ) ...@@ -299,7 +297,6 @@ parse_command_line( int argc, char* argv[] )
optarg); optarg);
exit(1); exit(1);
} }
nodes = xstrdup(optarg);
break; break;
case OPT_LONG_HELP: case OPT_LONG_HELP:
_help(); _help();
...@@ -375,17 +372,15 @@ parse_command_line( int argc, char* argv[] ) ...@@ -375,17 +372,15 @@ parse_command_line( int argc, char* argv[] )
xfree(name2); xfree(name2);
} }
/* Replace params.nodename with the new one */ /* Replace params.nodes with the new one */
hostset_destroy(params.nodes); hostset_destroy(params.nodes);
params.nodes = nodenames; params.nodes = nodenames;
/* Check if all node names specified /* Check if all node names specified
* with -w are known to the controller. * with -w are known to the controller.
*/ */
if (!_check_node_names(nodes)) { if (!_check_node_names(params.nodes)) {
xfree(nodes);
exit(1); exit(1);
} }
xfree(nodes);
} }
if ( ( params.accounts == NULL ) && if ( ( params.accounts == NULL ) &&
...@@ -1942,11 +1937,10 @@ Usage: squeue [OPTIONS]\n\ ...@@ -1942,11 +1937,10 @@ Usage: squeue [OPTIONS]\n\
/* _check_node_names() /* _check_node_names()
*/ */
static bool static bool
_check_node_names(char *names) _check_node_names(hostset_t names)
{ {
int cc; int cc;
node_info_msg_t *node_info; node_info_msg_t *node_info;
hostlist_t l;
char *host; char *host;
hostlist_iterator_t itr; hostlist_iterator_t itr;
...@@ -1961,8 +1955,7 @@ _check_node_names(char *names) ...@@ -1961,8 +1955,7 @@ _check_node_names(char *names)
return false; return false;
} }
l = slurm_hostlist_create(names); itr = hostset_iterator_create(names);
itr = hostlist_iterator_create(l);
while ((host = hostlist_next(itr))) { while ((host = hostlist_next(itr))) {
if (!_find_a_host(host, node_info)) { if (!_find_a_host(host, node_info)) {
error("Invalid node name %s", host); error("Invalid node name %s", host);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment