diff --git a/NEWS b/NEWS index 2dd6124458c73fa6119b5a81ae4d80141b887d34..2d0d11ef2547d512b3b84d3007fe028b132c644d 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ documents those changes that are of interest to users and admins. -- Fix code for clean build with gcc 2.96, Takao Hatazaki (HP). -- Add node update state of "RESUME" to return DRAINED, DRAINING, or DOWN node to service (IDLE or ALLOCATED state). + -- smap keeps trying to connect to slurmctld in iterative mode rather + than just aborting on failure. * Changes in SLURM 0.6.0-pre2 ============================= diff --git a/src/smap/smap.c b/src/smap/smap.c index 4e7fa40d9b3899bd1979b11a1f8e88f7a95522d2..1dadbf265448aac2b853853a25ece53b851debfa 100644 --- a/src/smap/smap.c +++ b/src/smap/smap.c @@ -75,21 +75,18 @@ int main(int argc, char *argv[]) //char *name; log_init(xbasename(argv[0]), opts, SYSLOG_FACILITY_DAEMON, NULL); parse_command_line(argc, argv); - error_code = slurm_load_node((time_t) NULL, &new_node_ptr, 0); - - if (error_code) { - printf("slurm_load_node: %s\n", - slurm_strerror(slurm_get_errno())); -#ifdef HAVE_BGL - if(params.display == COMMANDS) - pa_init(NULL); - else -#endif - exit(0); - - } else { - pa_init(new_node_ptr); + while (slurm_load_node((time_t) NULL, &new_node_ptr, 0)) { + error_code = slurm_get_errno(); + printf("slurm_load_node: %s\n", slurm_strerror(error_code)); + if (params.display == COMMANDS) { + new_node_ptr = NULL; + break; /* just continue */ + } + if (params.iterate == 0) + exit(1); + sleep(10); /* keep trying to reconnect */ } + pa_init(new_node_ptr); if(params.partition) {