From 68bacdf8e1abb25e3a238d565ddf0cc1208d77c0 Mon Sep 17 00:00:00 2001 From: Matthew LeGendre Date: Mon, 22 Jun 2026 11:17:35 -0700 Subject: [PATCH 01/10] Move cachpath consensus to be calculated at init time rather than on a FE message --- src/client/client_comlib/client_api.c | 51 ++++++++----------- src/fe/startup/spindle_fe.cc | 13 ----- src/include/ldcs_api.h | 2 - .../auditserver/ldcs_audit_server_handlers.c | 50 +++++------------- .../auditserver/ldcs_audit_server_handlers.h | 1 + .../auditserver/ldcs_audit_server_process.c | 22 +++++--- src/server/comlib/ldcs_api_util.c | 2 - 7 files changed, 51 insertions(+), 90 deletions(-) diff --git a/src/client/client_comlib/client_api.c b/src/client/client_comlib/client_api.c index cec31051..07735226 100644 --- a/src/client/client_comlib/client_api.c +++ b/src/client/client_comlib/client_api.c @@ -40,42 +40,31 @@ static struct lock_t comm_lock; int send_cachepath_query( int fd, char **chosen_realized_cachepath, char **chosen_parsed_cachepath){ - int retries = 0, max_retries = 1000, rc = 0; - struct timespec delay_between_retries = { .tv_sec = 0, .tv_nsec = 1000000 }; + int rc = 0; ldcs_message_t message; - char buffer[MAX_PATH_LEN+1]; + char buffer[2*(MAX_PATH_LEN+1)]; buffer[MAX_PATH_LEN] = '\0'; - do{ - message.header.type = LDCS_MSG_CHOSEN_CACHEPATH_REQUEST; - message.header.len = 0; - message.data = buffer; - - COMM_LOCK; - - debug_printf3("sending message of type: CHOSEN_CACHEPATH_REQUEST.\n" ); - rc = client_send_msg(fd, &message); - if( rc != 0 ){ - return rc; - } - rc = client_recv_msg_static(fd, &message, LDCS_READ_BLOCK); - if( rc != 0 ){ - return rc; - } - - COMM_UNLOCK; - - if( message.header.type == LDCS_MSG_NO_CACHEPATH_CONSENSUS_YET ){ - if( retries++ >= max_retries ){ - break; - } - nanosleep( &delay_between_retries, NULL ); - continue; - } - break; + message.header.type = LDCS_MSG_CHOSEN_CACHEPATH_REQUEST; + message.header.len = 0; + message.data = buffer; + + debug_printf3("sending message of type: CHOSEN_CACHEPATH_REQUEST.\n" ); + COMM_LOCK; - }while( 1 ); + rc = client_send_msg(fd, &message); + if( rc != 0 ){ + COMM_UNLOCK; + return rc; + } + rc = client_recv_msg_static(fd, &message, LDCS_READ_BLOCK); + if( rc != 0 ){ + COMM_UNLOCK; + return rc; + } + + COMM_UNLOCK; if (message.header.type != LDCS_MSG_CHOSEN_CACHEPATH || message.header.len > MAX_PATH_LEN) { err_printf("Got unexpected message of type %d\n", (int) message.header.type); diff --git a/src/fe/startup/spindle_fe.cc b/src/fe/startup/spindle_fe.cc index a038e201..0d5c0817 100644 --- a/src/fe/startup/spindle_fe.cc +++ b/src/fe/startup/spindle_fe.cc @@ -41,7 +41,6 @@ static const char *logging_file = NULL; #endif static const char spindle_bootstrap[] = LIBEXECDIR "/spindle_bootstrap"; static bool sendAndWaitForAlive(); -static void determineCachepathConsensus(); #define STARTUP_TIMEOUT 60 @@ -433,7 +432,6 @@ int spindleInitFE(const char **hosts, spindle_args_t *params) /* Wait for servers to indicate startup */ sendAndWaitForAlive(); - determineCachepathConsensus(); return 0; } @@ -490,17 +488,6 @@ void markRSHPidReapedFE() clear_fe_rsh_pid(); } -static void determineCachepathConsensus( void ){ - ldcs_message_t consensus_req_msg; - consensus_req_msg.header.type = LDCS_MSG_REQUEST_CACHEPATH_CONSENSUS; - consensus_req_msg.header.len = 0; - consensus_req_msg.data = NULL; - int result = ldcs_audit_server_fe_broadcast(&consensus_req_msg, NULL); - if (result == -1) { - debug_printf("Failure sending cachepath consensus message\n"); - } -} - static bool sendAndWaitForAlive() { int result; diff --git a/src/include/ldcs_api.h b/src/include/ldcs_api.h index 0bcd8f40..2b261a56 100644 --- a/src/include/ldcs_api.h +++ b/src/include/ldcs_api.h @@ -85,10 +85,8 @@ typedef enum { LDCS_MSG_PICKONE_RESP, LDCS_MSG_ALIVE_REQ, LDCS_MSG_ALIVE_RESP, - LDCS_MSG_REQUEST_CACHEPATH_CONSENSUS, LDCS_MSG_CHOSEN_CACHEPATH_REQUEST, LDCS_MSG_CHOSEN_CACHEPATH, - LDCS_MSG_NO_CACHEPATH_CONSENSUS_YET, LDCS_MSG_UNKNOWN } ldcs_message_ids_t; diff --git a/src/server/auditserver/ldcs_audit_server_handlers.c b/src/server/auditserver/ldcs_audit_server_handlers.c index 1afdf2e8..6b3a6b1c 100644 --- a/src/server/auditserver/ldcs_audit_server_handlers.c +++ b/src/server/auditserver/ldcs_audit_server_handlers.c @@ -181,7 +181,6 @@ static int handle_setup_alias(ldcs_process_data_t *procdata, char *pathname, cha static int handle_client_dirlists_req(ldcs_process_data_t *procdata, int nc); static int handle_close_client_query(ldcs_process_data_t *procdata, int nc); static int handle_alive_msg(ldcs_process_data_t *procdata, ldcs_message_t *msg); -static int handle_cachepath_consensus(ldcs_process_data_t *procdata, ldcs_message_t *msg); static int handle_chosen_cachepath_request(ldcs_process_data_t *procdata, int nc); extern void getValidCachePathByIndex( uint64_t validBitIdx, char **realizedCachePath, char **parsedCachePath, char **symbolicCachePath ); @@ -1997,8 +1996,6 @@ int handle_server_message(ldcs_process_data_t *procdata, node_peer_t peer, ldcs_ case LDCS_MSG_ALIVE_REQ: case LDCS_MSG_ALIVE_RESP: return handle_alive_msg(procdata, msg); - case LDCS_MSG_REQUEST_CACHEPATH_CONSENSUS: - return handle_cachepath_consensus(procdata, msg); default: err_printf("Received unexpected message from node: %d\n", (int) msg->header.type); assert(0); @@ -2961,35 +2958,26 @@ static int handle_client_pickone_msg(ldcs_process_data_t *procdata, int nc, ldcs } /** - * Handle LDCS_MSG_REQUEST_CACHEPATH_CONSENSUS to determine which cachepaths are - * available across all of the servers. + * Determine which cachepaths are available across all of the servers. */ -static int cachepath_consensus_reached; -static int handle_cachepath_consensus(ldcs_process_data_t *procdata, ldcs_message_t *msg){ - +int handle_cachepath_consensus(ldcs_process_data_t *procdata) +{ int num_children = ldcs_audit_server_md_get_num_children(procdata); - debug_printf( "Processing REQUEST_CACHEPATH_CONSENSUS.\n" ); + debug_printf( "Calculating cachepath consensus.\n" ); debug_printf3( " procdata->cachepath_bitidx = %#"PRIx64"\n", procdata->cachepath_bitidx ); debug_printf3( " procdata->cachepaths = %s\n", procdata->cachepaths ); debug_printf3( " procdata->cachepath = %s [should be null]\n", procdata->cachepath ); debug_printf3( " procdata->commpath = %s\n", procdata->commpath ); debug_printf3( " num_children = %d\n", num_children ); - if (num_children) { - spindle_broadcast(procdata, msg); - debug_printf3( "Successfully broadcast REQUEST_CACHEPATH_CONSENSUS\n" ); - msgbundle_force_flush(procdata); - debug_printf3( "Successfully flushed the broadcast of REQUEST_CACHEPATH_CONSENSUS\n" ); - } - ldcs_audit_server_md_allreduce_AND( &procdata->cachepath_bitidx ); debug_printf3( "The consensus value for procdata->cachepath_bitidx is: %#"PRIx64"\n", procdata->cachepath_bitidx ); - if( procdata->cachepath_bitidx == 0 ){ - err_printf("No valid cachepath path available. Falling back to \"commpath\" path (%s).\n", procdata->commpath); + if( procdata->cachepath_bitidx == 0 ) { + debug_printf("No valid cachepath path available. Falling back to \"commpath\" path (%s).\n", procdata->commpath); procdata->cachepath = procdata->commpath; - }else{ + } else { getValidCachePathByIndex( procdata->cachepath_bitidx, &procdata->cachepath, &procdata->parsed_cachepath, @@ -3003,14 +2991,10 @@ static int handle_cachepath_consensus(ldcs_process_data_t *procdata, ldcs_messag ldcs_audit_server_filemngt_init(procdata->cachepath, procdata->commpath); test_printf(" cachepath=%s\n", procdata->cachepath); - cachepath_consensus_reached = 1; return 0; } -/** - * Handle LDCS_MSG_CHOSEN_CACHEPATH_REQUEST - */ -static int handle_chosen_cachepath_request(ldcs_process_data_t *procdata, int nc){ +static int handle_chosen_cachepath_request(ldcs_process_data_t *procdata, int nc) { ldcs_message_t msg; int connid; ldcs_client_t *client; @@ -3022,18 +3006,12 @@ static int handle_chosen_cachepath_request(ldcs_process_data_t *procdata, int nc return 0; - if( cachepath_consensus_reached ){ - msg.header.type = LDCS_MSG_CHOSEN_CACHEPATH; - msg.header.len = strlen(procdata->cachepath) + 1 + strlen(procdata->parsed_cachepath) + 1; - msg.data = calloc( 1, msg.header.len ); - strcpy( msg.data, procdata->cachepath ); - strcpy( &msg.data[ strlen(procdata->cachepath)+1 ], procdata->parsed_cachepath ); - }else{ - msg.header.type = LDCS_MSG_NO_CACHEPATH_CONSENSUS_YET; - msg.header.len = 0; - msg.data = NULL; - } - + msg.header.type = LDCS_MSG_CHOSEN_CACHEPATH; + msg.header.len = strlen(procdata->cachepath) + 1 + strlen(procdata->parsed_cachepath) + 1; + msg.data = calloc( 1, msg.header.len ); + strcpy( msg.data, procdata->cachepath ); + strcpy( &msg.data[ strlen(procdata->cachepath)+1 ], procdata->parsed_cachepath ); + ldcs_send_msg(connid, &msg); free( msg.data ); procdata->server_stat.clientmsg.cnt++; diff --git a/src/server/auditserver/ldcs_audit_server_handlers.h b/src/server/auditserver/ldcs_audit_server_handlers.h index 8702316c..790e52b3 100644 --- a/src/server/auditserver/ldcs_audit_server_handlers.h +++ b/src/server/auditserver/ldcs_audit_server_handlers.h @@ -25,6 +25,7 @@ int handle_server_error(ldcs_process_data_t *procdata, node_peer_t peer); int handle_client_message(ldcs_process_data_t *procdata, int nc, ldcs_message_t *msg); int handle_client_start(ldcs_process_data_t *procdata, int nc); int handle_client_end(ldcs_process_data_t *procdata, int nc); +int handle_cachepath_consensus(ldcs_process_data_t *procdata); int exit_note_cb(int infd, int serverid, void *data); diff --git a/src/server/auditserver/ldcs_audit_server_process.c b/src/server/auditserver/ldcs_audit_server_process.c index b6ecdbff..7e32337d 100644 --- a/src/server/auditserver/ldcs_audit_server_process.c +++ b/src/server/auditserver/ldcs_audit_server_process.c @@ -137,7 +137,7 @@ void stopprofile() int ldcs_audit_server_process(spindle_args_t *args) { - int serverid, fd; + int serverid, fd, result; startprofile(args); @@ -198,7 +198,20 @@ int ldcs_audit_server_process(spindle_args_t *args) if (ldcs_process_data.opts & OPT_PROCCLEAN) init_cleanup_proc(ldcs_process_data.cachepath, ldcs_process_data.commpath); - debug_printf3("Initializing connections for clients at %s and %lu\n", + /* Calculate location of cache */ + debug_printf2("Calculating cache path location\n"); + determineValidCachePaths( + &ldcs_process_data.cachepath_bitidx, + ldcs_process_data.cachepaths, + ldcs_process_data.number ); + result = handle_cachepath_consensus(&ldcs_process_data); + if (result == -1) { + err_printf("Could not determine cachepath consensus\n"); + return -1; + } + + /* Setup connections for clients to start connecting */ + debug_printf2("Initializing connections for clients at %s and %lu\n", ldcs_process_data.commpath, (unsigned long) ldcs_process_data.number); serverid = ldcs_create_server(ldcs_process_data.commpath, ldcs_process_data.number); if (serverid == -1) { @@ -231,10 +244,7 @@ int ldcs_audit_server_process(spindle_args_t *args) if (fd != -1) { ldcs_listen_register_fd(fd, serverid, forceExitCB, (void *) &ldcs_process_data); } - determineValidCachePaths( - &ldcs_process_data.cachepath_bitidx, - ldcs_process_data.cachepaths, - ldcs_process_data.number ); + return 0; } diff --git a/src/server/comlib/ldcs_api_util.c b/src/server/comlib/ldcs_api_util.c index af101815..28a3d90c 100644 --- a/src/server/comlib/ldcs_api_util.c +++ b/src/server/comlib/ldcs_api_util.c @@ -91,10 +91,8 @@ char* _message_type_to_str (ldcs_message_ids_t type) { STR_CASE(LDCS_MSG_PICKONE_RESP); STR_CASE(LDCS_MSG_ALIVE_REQ); STR_CASE(LDCS_MSG_ALIVE_RESP); - STR_CASE(LDCS_MSG_REQUEST_CACHEPATH_CONSENSUS); STR_CASE(LDCS_MSG_CHOSEN_CACHEPATH_REQUEST); STR_CASE(LDCS_MSG_CHOSEN_CACHEPATH); - STR_CASE(LDCS_MSG_NO_CACHEPATH_CONSENSUS_YET); STR_CASE(LDCS_MSG_UNKNOWN); } return "unknown"; From 107247390de0258c45bb6e6409ec704c59d05bab Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Sat, 4 Jul 2026 15:24:17 -0700 Subject: [PATCH 02/10] [multiple-commpaths] Replaces --commpath with --commpaths. Takes a colon-separated list of commpaths. The choice of which of those to use is made per-server. The first workable path is selected. The paths may differ from server to server: unlike --cachepaths, there is no consensus process. --- config.h.in | 5 ++- configure | 18 ++++----- configure.common.ac | 12 +++--- .../scripts/build_spindle.sh | 2 +- .../scripts/build_spindle.sh | 2 +- .../testing-plugin/scripts/build_spindle.sh | 2 +- .../testing-srun/scripts/build_spindle.sh | 2 +- .../testing/scripts/build_spindle.sh | 2 +- src/client/beboot/spindle_bootstrap.c | 20 ++++------ src/client/config.h.in | 5 ++- src/client/configure | 18 ++++----- src/fe/config.h.in | 5 ++- src/fe/configure | 18 ++++----- src/fe/startup/config_mgr.cc | 22 ++++++----- src/fe/startup/config_mgr.h | 4 +- src/fe/startup/parse_launcher.cc | 3 +- src/fe/startup/spindle_fe.cc | 10 ++--- src/flux/flux-spindle.c | 8 ++-- src/flux/sessionmgr.c | 29 ++++----------- src/include/spindle_launch.h | 3 ++ src/server/config.h.in | 5 ++- src/server/configure | 18 ++++----- src/server/startup/spindle_be.cc | 19 ++++------ src/slurm_plugin/Makefile.am | 2 +- src/slurm_plugin/Makefile.in | 2 +- src/slurm_plugin/plugin_utils.c | 37 ++++--------------- src/slurm_plugin/slurm_plugin.c | 8 +--- src/utils/parseloc.c | 18 +++++++++ src/utils/parseloc.h | 2 +- 29 files changed, 140 insertions(+), 161 deletions(-) diff --git a/config.h.in b/config.h.in index 121c551f..54fa292b 100644 --- a/config.h.in +++ b/config.h.in @@ -9,8 +9,9 @@ /* Colon-separated list of potential back-end cache directories */ #undef CACHEPATHS -/* Back-end directory for communication and housekeeping */ -#undef COMMPATH +/* Colon-separated list of candidate paths for back-end communication and + housekeeping */ +#undef COMMPATHS /* Define if were using biter for client/server communication */ #undef COMM_BITER diff --git a/configure b/configure index ac8d1434..1503b981 100755 --- a/configure +++ b/configure @@ -850,7 +850,7 @@ with_default_num_ports with_localstorage with_cachepaths with_cachepath -with_commpath +with_commpaths with_default_local_prefix with_testrm with_rm @@ -1598,8 +1598,8 @@ Optional Packages: --with-cachepaths=DIR Colon-separated list of potential back-end cache directories , - --with-compath=DIR Back-end directory for communication and - housekeeping + --with-compaths=DIR Colon-separated list of candidate paths for back-end + communication and housekeeping --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -16691,11 +16691,11 @@ if test "${with_cachepath+set}" = set; then : fi -# Check whether --with-commpath was given. -if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} else - COMMPATH=$DEFAULT_LOC + COMMPATHS=$DEFAULT_LOC fi @@ -16703,7 +16703,7 @@ fi if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} else - SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATH" + SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATHS" fi @@ -16723,7 +16723,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF diff --git a/configure.common.ac b/configure.common.ac index baa9c0a9..010b050f 100644 --- a/configure.common.ac +++ b/configure.common.ac @@ -29,18 +29,18 @@ AC_ARG_WITH(cachepath, [[],[]], [AC_MSG_ERROR(use --with-cachepaths=DIRS (plural) instead of --with-cachepath=DIR to specify one or more cache paths)], []) -AC_ARG_WITH(commpath, - [AS_HELP_STRING([--with-compath=DIR],[Back-end directory for communication and housekeeping])], - [COMMPATH=${withval}], - [COMMPATH=$DEFAULT_LOC]) +AC_ARG_WITH(commpaths, + [AS_HELP_STRING([--with-compaths=DIR],[Colon-separated list of candidate paths for back-end communication and housekeeping])], + [COMMPATHS=${withval}], + [COMMPATHS=$DEFAULT_LOC]) AC_ARG_WITH(default-local-prefix, [AS_HELP_STRING([--with-default-local-prefix=DIRS],[Colon-seperated list of directories that Spindle will not cache files out of])], [SPINDLE_LOCAL_PREFIX=${withval}], - [SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATH"]) + [SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATHS"]) AC_DEFINE_UNQUOTED([SPINDLE_PORT],[$SPINDLE_PORT],[The default port for Spindle]) AC_DEFINE_UNQUOTED([NUM_COBO_PORTS],[$NUM_COBO_PORTS],[Number of ports for COBO to search for an open port]) AC_DEFINE_UNQUOTED([SPINDLE_MAX_PORT],[$(($SPINDLE_PORT + $NUM_COBO_PORTS - 1))],[The maximum port value]) -AC_DEFINE_UNQUOTED([COMMPATH],"[$COMMPATH]",[Back-end directory for communication and housekeeping]) +AC_DEFINE_UNQUOTED([COMMPATHS],"[$COMMPATHS]",[Colon-separated list of candidate paths for back-end communication and housekeeping]) AC_DEFINE_UNQUOTED([CACHEPATHS],"[$CACHEPATHS]",[Colon-separated list of potential back-end cache directories]) AC_DEFINE_UNQUOTED([SPINDLE_LOCAL_PREFIX],"[$SPINDLE_LOCAL_PREFIX]",[The default colon-separated list of directories that Spindle will not cache files out of]) diff --git a/containers/spindle-flux-ubuntu/scripts/build_spindle.sh b/containers/spindle-flux-ubuntu/scripts/build_spindle.sh index a63b5d8d..454bca88 100755 --- a/containers/spindle-flux-ubuntu/scripts/build_spindle.sh +++ b/containers/spindle-flux-ubuntu/scripts/build_spindle.sh @@ -4,7 +4,7 @@ set -euxo pipefail mkdir -p /home/${USER}/Spindle-build cd /home/${USER}/Spindle-build -/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=flux --enable-flux-plugin --with-cachepaths=/tmp/commpath/cachepath --with-commpath=/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" +/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=flux --enable-flux-plugin --with-cachepaths=/bad_cachepath:/tmp/commpath/cachepath --with-commpaths=/bad_commpath:/tmp/commpaths CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" make -j$(nproc) make install diff --git a/containers/spindle-serial-ubuntu/scripts/build_spindle.sh b/containers/spindle-serial-ubuntu/scripts/build_spindle.sh index 1022ba14..c18c202d 100755 --- a/containers/spindle-serial-ubuntu/scripts/build_spindle.sh +++ b/containers/spindle-serial-ubuntu/scripts/build_spindle.sh @@ -4,7 +4,7 @@ set -euxo pipefail mkdir -p /home/${USER}/Spindle-build cd /home/${USER}/Spindle-build -/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=serial --with-cachepaths=/tmp/commpath/cachepath --with-commpath=/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" +/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=serial --with-cachepaths=/bad_cachepath:/tmp/commpath/cachepath --with-commpaths=/bad_commpath:/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" make -j$(nproc) make install diff --git a/containers/spindle-slurm-ubuntu/testing-plugin/scripts/build_spindle.sh b/containers/spindle-slurm-ubuntu/testing-plugin/scripts/build_spindle.sh index 2b36be90..c214630d 100755 --- a/containers/spindle-slurm-ubuntu/testing-plugin/scripts/build_spindle.sh +++ b/containers/spindle-slurm-ubuntu/testing-plugin/scripts/build_spindle.sh @@ -3,7 +3,7 @@ set -euxo pipefail mkdir -p /home/${USER}/Spindle-build cd /home/${USER}/Spindle-build -/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=slurm-plugin --enable-slurm-plugin --with-cachepaths=/tmp/commpath/cachepath --with-commpath=/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" +/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=slurm-plugin --enable-slurm-plugin --with-cachepaths=/bad_cachepath:/tmp/commpath/cachepath --with-commpaths=/bad_commpath:/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" make -j$(nproc) make install diff --git a/containers/spindle-slurm-ubuntu/testing-srun/scripts/build_spindle.sh b/containers/spindle-slurm-ubuntu/testing-srun/scripts/build_spindle.sh index 125fe2eb..165de7c9 100755 --- a/containers/spindle-slurm-ubuntu/testing-srun/scripts/build_spindle.sh +++ b/containers/spindle-slurm-ubuntu/testing-srun/scripts/build_spindle.sh @@ -3,7 +3,7 @@ set -euxo pipefail mkdir -p /home/${USER}/Spindle-build cd /home/${USER}/Spindle-build -/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=slurm --with-cachepaths=/tmp/commpath/cachepath --with-commpath=/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" +/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=slurm --with-cachepaths=/bad_cachepath:/tmp/commpath/cachepath --with-commpaths=/bad_commpath:/tmp/commpath:/bar CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" make -j$(nproc) make install diff --git a/containers/spindle-slurm-ubuntu/testing/scripts/build_spindle.sh b/containers/spindle-slurm-ubuntu/testing/scripts/build_spindle.sh index 7fcb48e3..7cdf58dd 100755 --- a/containers/spindle-slurm-ubuntu/testing/scripts/build_spindle.sh +++ b/containers/spindle-slurm-ubuntu/testing/scripts/build_spindle.sh @@ -3,7 +3,7 @@ set -euxo pipefail mkdir -p /home/${USER}/Spindle-build cd /home/${USER}/Spindle-build -/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=slurm --with-rsh-launch --with-rsh-cmd=/usr/bin/ssh --with-cachepaths=/tmp/commpath/cachepath --with-commpath=/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" +/home/${USER}/Spindle/configure --prefix=/home/${USER}/Spindle-inst --enable-sec-munge --with-rm=slurm --with-rsh-launch --with-rsh-cmd=/usr/bin/ssh --with-cachepaths=/bad_cachepath:/tmp/commpath/cachepath --with-commpaths=/bad_commpath:/tmp/commpath CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" make -j$(nproc) make install diff --git a/src/client/beboot/spindle_bootstrap.c b/src/client/beboot/spindle_bootstrap.c index e769fe4c..b814c5e2 100644 --- a/src/client/beboot/spindle_bootstrap.c +++ b/src/client/beboot/spindle_bootstrap.c @@ -33,6 +33,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "client_api.h" #include "exec_util.h" #include "shmcache.h" +#include "parseloc.h" #include "config.h" @@ -53,7 +54,7 @@ static int rankinfo[4]={-1,-1,-1,-1}; number_t number; static int use_cache; static unsigned int cachesize; -static char *commpath, *number_s, *symbolic_commpath; +static char *commpath, *number_s, *commpaths; static char **cmdline; static char *executable; static char *client_lib; @@ -168,7 +169,7 @@ static int parse_cmdline(int argc, char *argv[]) daemon_args[i - 3] = NULL; } - symbolic_commpath = argv[i++]; + commpaths = argv[i++]; i++; // Skip over candidate_cachepaths. number_s = argv[i++]; number = (number_t) strtoul(number_s, NULL, 0); @@ -182,7 +183,7 @@ static int parse_cmdline(int argc, char *argv[]) return 0; } -static void launch_daemon(char *commpath) +static void launch_daemon( void ) { /*grand-child fork, then execv daemon. By grand-child forking we ensure that the app won't get confused by seeing an unknown process as a child. */ @@ -192,11 +193,6 @@ static void launch_daemon(char *commpath) char unique_file[MAX_PATH_LEN+1]; char buffer[32]; - result = spindle_mkdir(commpath); - if (result == -1) { - debug_printf("Exiting due to spindle_mkdir error\n"); - exit(-1); - } snprintf(unique_file, MAX_PATH_LEN, "%s/spindle_daemon_pid", commpath); unique_file[MAX_PATH_LEN] = '\0'; fd = open(unique_file, O_CREAT | O_EXCL | O_WRONLY, 0600); @@ -352,14 +348,12 @@ int main(int argc, char *argv[]) } } - char *orig_commpath = parse_location(symbolic_commpath, number); - if (!orig_commpath) { - return -1; + if( -1 == getFirstValidPath( commpaths, &commpath, number ) ){ + return -1; } - commpath = realize(orig_commpath); if (daemon_args) { - launch_daemon(commpath); + launch_daemon(); } result = establish_connection(); diff --git a/src/client/config.h.in b/src/client/config.h.in index 044ca9e1..2869ccd7 100644 --- a/src/client/config.h.in +++ b/src/client/config.h.in @@ -9,8 +9,9 @@ /* Colon-separated list of potential back-end cache directories */ #undef CACHEPATHS -/* Back-end directory for communication and housekeeping */ -#undef COMMPATH +/* Colon-separated list of candidate paths for back-end communication and + housekeeping */ +#undef COMMPATHS /* Define if were using biter for client/server communication */ #undef COMM_BITER diff --git a/src/client/configure b/src/client/configure index eb84ee07..7a59cba7 100755 --- a/src/client/configure +++ b/src/client/configure @@ -813,7 +813,7 @@ with_default_num_ports with_localstorage with_cachepaths with_cachepath -with_commpath +with_commpaths with_default_local_prefix with_testrm with_rm @@ -1540,8 +1540,8 @@ Optional Packages: --with-cachepaths=DIR Colon-separated list of potential back-end cache directories , - --with-compath=DIR Back-end directory for communication and - housekeeping + --with-compaths=DIR Colon-separated list of candidate paths for back-end + communication and housekeeping --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -12616,11 +12616,11 @@ if test "${with_cachepath+set}" = set; then : fi -# Check whether --with-commpath was given. -if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} else - COMMPATH=$DEFAULT_LOC + COMMPATHS=$DEFAULT_LOC fi @@ -12628,7 +12628,7 @@ fi if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} else - SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATH" + SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATHS" fi @@ -12648,7 +12648,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF diff --git a/src/fe/config.h.in b/src/fe/config.h.in index 615997be..2ab5066c 100644 --- a/src/fe/config.h.in +++ b/src/fe/config.h.in @@ -9,8 +9,9 @@ /* Colon-separated list of potential back-end cache directories */ #undef CACHEPATHS -/* Back-end directory for communication and housekeeping */ -#undef COMMPATH +/* Colon-separated list of candidate paths for back-end communication and + housekeeping */ +#undef COMMPATHS /* Define if were using biter for client/server communication */ #undef COMM_BITER diff --git a/src/fe/configure b/src/fe/configure index 4c11bdc7..43bec26e 100755 --- a/src/fe/configure +++ b/src/fe/configure @@ -834,7 +834,7 @@ with_default_num_ports with_localstorage with_cachepaths with_cachepath -with_commpath +with_commpaths with_default_local_prefix with_testrm with_rm @@ -1578,8 +1578,8 @@ Optional Packages: --with-cachepaths=DIR Colon-separated list of potential back-end cache directories , - --with-compath=DIR Back-end directory for communication and - housekeeping + --with-compaths=DIR Colon-separated list of candidate paths for back-end + communication and housekeeping --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -16466,11 +16466,11 @@ if test "${with_cachepath+set}" = set; then : fi -# Check whether --with-commpath was given. -if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} else - COMMPATH=$DEFAULT_LOC + COMMPATHS=$DEFAULT_LOC fi @@ -16478,7 +16478,7 @@ fi if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} else - SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATH" + SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATHS" fi @@ -16498,7 +16498,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF diff --git a/src/fe/startup/config_mgr.cc b/src/fe/startup/config_mgr.cc index 1b9d9ade..02235648 100644 --- a/src/fe/startup/config_mgr.cc +++ b/src/fe/startup/config_mgr.cc @@ -50,10 +50,10 @@ using namespace std; #define SPINDLE_NUM_PORTS_STR "250" #endif -#if defined(COMMPATH) -#define SPINDLE_COMMPATH_STR COMMPATH +#if defined(COMMPATHS) +#define SPINDLE_COMMPATHS_STR COMMPATHS #else -#define SPINDLE_COMMPATH_STR "$TMPDIR" +#define SPINDLE_COMMPATHS_STR "$TMPDIR" #endif #if defined(CACHEPATHS) @@ -273,7 +273,7 @@ void initOptionsList() "Provides a text file containing a white-space separated list of files that should be relocated to each node before execution begins" }, { confStrip, "strip", shortStrip, groupMisc, cvBool, {}, "true", "Strip debug and symbol information from binaries before distributing them." }, - { confCommPath, "commpath", shortCommPath, groupMisc, cvString, {}, SPINDLE_COMMPATH_STR, + { confCommPaths, "commpaths", shortCommPaths, groupMisc, cvString, {}, SPINDLE_COMMPATHS_STR, "Back-end directory communication and housekeeping. Should be a non-shared location such as a ramdisk." }, { confCachePaths, "cachepaths", shortCachePaths, groupMisc, cvString, {}, SPINDLE_CACHEPATHS_STR, "Colon-separated list of candidate paths for cached libraries."}, @@ -743,11 +743,8 @@ bool ConfigMap::toSpindleArgs(spindle_args_t &args, bool alloc_strs) const case confNumPorts: args.num_ports = numresult; break; - case confCommPath: { - string path = strresult + "/spindle.$NUMBER"; - args.commpath = strdup(path.c_str()); - break; - } + case confCommPaths: + __attribute__((fallthrough)); // gcc-specific case confCachePaths:{ // Paramemter values are colon-separated lists of paths. // Append "/spindle.$NUMBER" to each path in the list. @@ -760,10 +757,15 @@ bool ConfigMap::toSpindleArgs(spindle_args_t &args, bool alloc_strs) const idx = paths.find(":", idx + number_var_with_colon.size()); }; paths += number_var_without_colon; - args.candidate_cachepaths = strdup(paths.c_str()); + if( name == confCommPaths ){ + args.commpaths = strdup(paths.c_str()); + }else if( name == confCachePaths ){ + args.candidate_cachepaths = strdup(paths.c_str()); + } break; } case confCachePrefix: + __attribute__((fallthrough)); // gcc-specific case confPythonPrefix: if (args.pythonprefix) args.pythonprefix = getstr(string(args.pythonprefix) + string(":") + strresult, true); diff --git a/src/fe/startup/config_mgr.h b/src/fe/startup/config_mgr.h index ec3c8135..f679a5d5 100644 --- a/src/fe/startup/config_mgr.h +++ b/src/fe/startup/config_mgr.h @@ -29,7 +29,7 @@ enum SpindleConfigID { confCmdlineNewgroup, confPort, confNumPorts, - confCommPath, + confCommPaths, confCachePaths, confCachePrefix, confPythonPrefix, @@ -83,7 +83,7 @@ enum CmdlineShortOptions { shortAuditType = 'k', shortRelocSO = 'l', shortNoClean = 'n', - shortCommPath = 'o', + shortCommPaths = 'o', shortPush = 'p', shortPull = 'q', shortPythonPrefix = 'r', diff --git a/src/fe/startup/parse_launcher.cc b/src/fe/startup/parse_launcher.cc index 4484e998..e8226b73 100644 --- a/src/fe/startup/parse_launcher.cc +++ b/src/fe/startup/parse_launcher.cc @@ -26,7 +26,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include - +#include "parseloc.h" #include "spindle_launch.h" #include "spindle_debug.h" #include "config.h" @@ -292,6 +292,7 @@ void ModifyArgv::modifyCmdLine() snprintf(options_str, 32, "%lu", (unsigned long) params->opts); string options(options_str); + getFirstValidPath( params->commpaths, &( params->commpath ), params->number ); string commpath(params->commpath); char number_str[32]; diff --git a/src/fe/startup/spindle_fe.cc b/src/fe/startup/spindle_fe.cc index 0d5c0817..9e5b7577 100644 --- a/src/fe/startup/spindle_fe.cc +++ b/src/fe/startup/spindle_fe.cc @@ -70,7 +70,7 @@ static int pack_data(spindle_args_t *args, void* &buffer, unsigned &buffer_size) buffer_size += sizeof(number_t); buffer_size += sizeof(opt_t); buffer_size += sizeof(unique_id_t); - buffer_size += args->commpath ? strlen(args->commpath) + 1 : 1; + buffer_size += args->commpaths ? strlen(args->commpaths) + 1 : 1; buffer_size += args->candidate_cachepaths ? strlen(args->candidate_cachepaths) + 1 : 1; buffer_size += args->pythonprefix ? strlen(args->pythonprefix) + 1 : 1; buffer_size += args->preloadfile ? strlen(args->preloadfile) + 1 : 1; @@ -91,7 +91,7 @@ static int pack_data(spindle_args_t *args, void* &buffer, unsigned &buffer_size) pack_param(args->use_launcher, buf, pos); pack_param(args->startup_type, buf, pos); pack_param(args->shm_cache_size, buf, pos); - pack_param(args->commpath, buf, pos); + pack_param(args->commpaths, buf, pos); pack_param(args->candidate_cachepaths, buf, pos); pack_param(args->pythonprefix, buf, pos); pack_param(args->preloadfile, buf, pos); @@ -231,7 +231,7 @@ int getApplicationArgsFE(spindle_args_t *params, int *spindle_argc, char ***spin (*spindle_argv)[n++] = strdup(numports_s); (*spindle_argv)[n++] = strdup(uniqueid_s); } - (*spindle_argv)[n++] = strdup(params->commpath); + (*spindle_argv)[n++] = strdup(params->commpaths); (*spindle_argv)[n++] = strdup(params->candidate_cachepaths); (*spindle_argv)[n++] = strdup(number_s); (*spindle_argv)[n++] = strdup(opt_s); @@ -397,11 +397,11 @@ int spindleInitFE(const char **hosts, spindle_args_t *params) /* Start FE server */ debug_printf("spindle_args_t { number = %lu; port = %u; num_ports = %u; opts = %lu; unique_id = %lu; " - "use_launcher = %u; startup_type = %u; shm_cache_size = %u; commpath = %s; " + "use_launcher = %u; startup_type = %u; shm_cache_size = %u; commpaths = %s; " "cachepaths = %s; " "pythonprefix = %s; preloadfile = %s; bundle_timeout_ms = %u; bundle_cachesize_kb = %u }\n", (unsigned long) params->number, params->port, params->num_ports, params->opts, params->unique_id, - params->use_launcher, params->startup_type, params->shm_cache_size, params->commpath, + params->use_launcher, params->startup_type, params->shm_cache_size, params->commpaths, params->candidate_cachepaths, params->pythonprefix, params->preloadfile, params->bundle_timeout_ms, params->bundle_cachesize_kb); diff --git a/src/flux/flux-spindle.c b/src/flux/flux-spindle.c index dd00aa32..9517e523 100644 --- a/src/flux/flux-spindle.c +++ b/src/flux/flux-spindle.c @@ -381,7 +381,7 @@ static int sp_getopts (flux_shell_t *shell, struct spindle_ctx *ctx) int numa = 0; const char *relocaout = NULL, *reloclibs = NULL, *relocexec = NULL, *relocpython = NULL; const char *followfork = NULL, *preload = NULL, *level = NULL; - const char *pyprefix = NULL, *commpath = NULL; + const char *pyprefix = NULL, *commpaths = NULL; char *numafiles = NULL, *cachepaths = NULL; if (flux_shell_getopt_unpack (shell, "spindle", "o", &opts) < 0) @@ -415,7 +415,7 @@ static int sp_getopts (flux_shell_t *shell, struct spindle_ctx *ctx) "reloc-exec", &relocexec, "reloc-python", &relocpython, "python-prefix", &pyprefix, - "commpath", &commpath, + "commpaths", &commpaths, "numa", &numa, "numa-files", &numafiles, "preload", &preload, @@ -466,8 +466,8 @@ static int sp_getopts (flux_shell_t *shell, struct spindle_ctx *ctx) if( cachepaths ){ ctx->params.candidate_cachepaths = cachepaths; } - if (commpath) { - ctx->params.commpath = (char *) commpath; + if (commpaths) { + ctx->params.commpaths = (char *) commpaths; } if (level) { if (strcmp(level, "high") == 0) { diff --git a/src/flux/sessionmgr.c b/src/flux/sessionmgr.c index 17027163..a936c46b 100644 --- a/src/flux/sessionmgr.c +++ b/src/flux/sessionmgr.c @@ -106,27 +106,14 @@ char **strip_start_from_argv(int argc, char **argv) return new_argv; } -extern char *parse_location(char *loc, int number); -extern int spindle_mkdir(char *orig_path); - -#if !defined(COMMPATH) -#error COMMPATH must be defined in config.h -#endif +#define SESSIONPATH "/tmp/spindle/session" const char *get_session_dir() { - int result; - char *dir; - dir = parse_location((char *) (COMMPATH "/spindle_session"), 0); - if (!dir) { - spindle_debug_printf(1, "ERROR: Could not parse directory for spindle session location from %s/spindle_session\n", COMMPATH); - return NULL; - } - - result = spindle_mkdir(dir); - if (result == -1) { - spindle_debug_printf(1, "ERROR: Could not mkdir spindle session location at %s\n", dir); - free(dir); - return NULL; - } - return dir; + /* This function was originally designed to return a realized version of COMMPATH. + * Since then, COMMPATH has been replaced by COMMPATHS, which can be modified by + * the user on a per-job basis and uses the number_t number as part of the path + * name. Sessions are designed to span multiple jobs, and thus shouldn't be + * piggybacking on COMMPATHS. For now, we'll put in a hardcoded directory. + */ + return strdup(SESSIONPATH); } diff --git a/src/include/spindle_launch.h b/src/include/spindle_launch.h index ca7b8d3d..ac256a39 100644 --- a/src/include/spindle_launch.h +++ b/src/include/spindle_launch.h @@ -126,6 +126,9 @@ typedef struct { /* The local-disk location for communication and housekeeping. */ char *commpath; + /* The initial colon-separated list of commpath candidates. */ + char *commpaths; + /* Path[s] for cached libraries. */ char *candidate_cachepaths; /* Colon-separated list of candidate paths (max 64) */ diff --git a/src/server/config.h.in b/src/server/config.h.in index 24040627..97bc7ce9 100644 --- a/src/server/config.h.in +++ b/src/server/config.h.in @@ -9,8 +9,9 @@ /* Colon-separated list of potential back-end cache directories */ #undef CACHEPATHS -/* Back-end directory for communication and housekeeping */ -#undef COMMPATH +/* Colon-separated list of candidate paths for back-end communication and + housekeeping */ +#undef COMMPATHS /* Define if were using biter for client/server communication */ #undef COMM_BITER diff --git a/src/server/configure b/src/server/configure index 83bff908..1b9bfd96 100755 --- a/src/server/configure +++ b/src/server/configure @@ -840,7 +840,7 @@ with_default_num_ports with_localstorage with_cachepaths with_cachepath -with_commpath +with_commpaths with_default_local_prefix with_testrm with_rm @@ -1575,8 +1575,8 @@ Optional Packages: --with-cachepaths=DIR Colon-separated list of potential back-end cache directories , - --with-compath=DIR Back-end directory for communication and - housekeeping + --with-compaths=DIR Colon-separated list of candidate paths for back-end + communication and housekeeping --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -16463,11 +16463,11 @@ if test "${with_cachepath+set}" = set; then : fi -# Check whether --with-commpath was given. -if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} else - COMMPATH=$DEFAULT_LOC + COMMPATHS=$DEFAULT_LOC fi @@ -16475,7 +16475,7 @@ fi if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} else - SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATH" + SPINDLE_LOCAL_PREFIX="$DEFAULT_LOCAL_PREFIX:$COMMPATHS" fi @@ -16495,7 +16495,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF diff --git a/src/server/startup/spindle_be.cc b/src/server/startup/spindle_be.cc index d5a234a1..17e072f6 100644 --- a/src/server/startup/spindle_be.cc +++ b/src/server/startup/spindle_be.cc @@ -58,7 +58,7 @@ static int unpack_data(spindle_args_t *args, void *buffer, int buffer_size) unpack_param(args->use_launcher, buf, pos); unpack_param(args->startup_type, buf, pos); unpack_param(args->shm_cache_size, buf, pos); - unpack_param(args->commpath, buf, pos); + unpack_param(args->commpaths, buf, pos); unpack_param(args->candidate_cachepaths, buf, pos); unpack_param(args->pythonprefix, buf, pos); unpack_param(args->preloadfile, buf, pos); @@ -146,17 +146,14 @@ int spindleRunBE(unsigned int port, unsigned int num_ports, unique_id_t unique_i assert(args.port == port); - /* Expand environment variables in commpath. */ - char *new_commpath = parse_location(args.commpath, args.number); - if (!new_commpath) { - err_printf("Failed to convert commpath %s\n", args.commpath); - if (args.startup_type == startup_external) - LOGGING_FINI; - return -1; + /* Find the first valid commpath in the commpaths list. */ + if( -1 == getFirstValidPath( args.commpaths, &( args.commpath ), args.number ) ){ + // Failed. + err_printf("Failed to find valid commpath in %s\n", args.commpaths); + if (args.startup_type == startup_external) + LOGGING_FINI; + return -1; } - debug_printf("Translated commpath from %s to %s\n", args.commpath, new_commpath); - free(args.commpath); - args.commpath = strdup(new_commpath); result = ldcs_audit_server_process(&args); if (result == -1) { diff --git a/src/slurm_plugin/Makefile.am b/src/slurm_plugin/Makefile.am index 489dffcb..f712463b 100644 --- a/src/slurm_plugin/Makefile.am +++ b/src/slurm_plugin/Makefile.am @@ -3,7 +3,7 @@ lib_LTLIBRARIES = libspindleslurm.la libver=`$(top_srcdir)/LIB_VERSION spindleslurm` libspindleslurm_la_SOURCES = encode_decode.c plugin_utils.c slurm_plugin.c $(top_srcdir)/src/utils/spindle_mkdir.c $(top_srcdir)/src/utils/parseloc.c -libspindleslurm_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/include -I$(top_srcdir)/src/logging -DUSE_PLUGIN_DEBUG -DDEBUG -DCUSTOM_GETENV -DCUSTOM_GETENV_FREE -DSCONTROL_BIN="$(SCONTROL_ABSPATH)" -DSINFO_BIN="$(SINFO_ABSPATH)" -DSPINDLE_DO_EXPORT +libspindleslurm_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/utils -I$(top_srcdir)/src/include -I$(top_srcdir)/src/logging -DUSE_PLUGIN_DEBUG -DDEBUG -DCUSTOM_GETENV -DCUSTOM_GETENV_FREE -DSCONTROL_BIN="$(SCONTROL_ABSPATH)" -DSINFO_BIN="$(SINFO_ABSPATH)" -DSPINDLE_DO_EXPORT libspindleslurm_la_LDFLAGS = $(AM_LDFLAGS) -ldl -version-info $(libver) libspindleslurm_la_LIBADD = $(top_builddir)/src/server/startup/libspindlebe.la $(top_builddir)/src/fe/startup/libspindlefe.la libspindleslurm_la_CFLAGS = $(CFLAGS) -fvisibility=hidden diff --git a/src/slurm_plugin/Makefile.in b/src/slurm_plugin/Makefile.in index a7fe188f..8d3f3643 100644 --- a/src/slurm_plugin/Makefile.in +++ b/src/slurm_plugin/Makefile.in @@ -383,7 +383,7 @@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libspindleslurm.la libver = `$(top_srcdir)/LIB_VERSION spindleslurm` libspindleslurm_la_SOURCES = encode_decode.c plugin_utils.c slurm_plugin.c $(top_srcdir)/src/utils/spindle_mkdir.c $(top_srcdir)/src/utils/parseloc.c -libspindleslurm_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/include -I$(top_srcdir)/src/logging -DUSE_PLUGIN_DEBUG -DDEBUG -DCUSTOM_GETENV -DCUSTOM_GETENV_FREE -DSCONTROL_BIN="$(SCONTROL_ABSPATH)" -DSINFO_BIN="$(SINFO_ABSPATH)" -DSPINDLE_DO_EXPORT +libspindleslurm_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/utils -I$(top_srcdir)/src/include -I$(top_srcdir)/src/logging -DUSE_PLUGIN_DEBUG -DDEBUG -DCUSTOM_GETENV -DCUSTOM_GETENV_FREE -DSCONTROL_BIN="$(SCONTROL_ABSPATH)" -DSINFO_BIN="$(SINFO_ABSPATH)" -DSPINDLE_DO_EXPORT libspindleslurm_la_LDFLAGS = $(AM_LDFLAGS) -ldl -version-info $(libver) libspindleslurm_la_LIBADD = $(top_builddir)/src/server/startup/libspindlebe.la $(top_builddir)/src/fe/startup/libspindlefe.la libspindleslurm_la_CFLAGS = $(CFLAGS) -fvisibility=hidden diff --git a/src/slurm_plugin/plugin_utils.c b/src/slurm_plugin/plugin_utils.c index f77531e4..0a8f0eaf 100644 --- a/src/slurm_plugin/plugin_utils.c +++ b/src/slurm_plugin/plugin_utils.c @@ -12,6 +12,7 @@ #include #include #include "plugin_utils.h" +#include "parseloc.h" #if !defined(STR) #define XSTR(X) #X @@ -297,33 +298,6 @@ int isFEHost(char **hostlist, unsigned int num_hosts) (void) error; return feresult; } - -static char* locSpecificDir(spindle_args_t *params) -{ - char *dir = NULL, *expanded_dir = NULL, *realized_dir = NULL; - - dir = params->commpath; - if (!dir) { - sdprintf(1, "ERROR: Location not filled in\n"); - goto done; - } - expanded_dir = parse_location(dir, params->number); - if (!expanded_dir) { - sdprintf(1, "ERROR: Could not expand file-system dir %s\n", dir); - goto done; - } - realized_dir = realize(expanded_dir); - if (!realized_dir) { - sdprintf(1, "ERROR: Could not turn dir to a real path\n"); - } - - done: - if (expanded_dir) - free(expanded_dir); - - return realized_dir; -} - #define SOCKET_PREFIX "spFE" static char* exitSocketPath(spindle_args_t *params) @@ -332,11 +306,11 @@ static char* exitSocketPath(spindle_args_t *params) char session_id_str[32]; size_t socket_path_len; - realized_dir = locSpecificDir(params); - if (!realized_dir) { + if( -1 == getFirstValidPath( params->commpaths, &( params->commpath ), params->number )){ err_printf("Could not get real path for FE exit socket\n"); goto done; } + realized_dir = strdup( params->commpath ); snprintf(session_id_str, sizeof(session_id_str), "%lu", (unsigned long) params->number); @@ -525,7 +499,10 @@ int isBEProc(spindle_args_t *params, unsigned int exit_phase) int beproc_result = -1; int fd = -1, error; - realized_dir = locSpecificDir(params); + if( -1 == getFirstValidPath( params->commpaths, &( params->commpath ), params->number ) ){ + return -1; + } + realized_dir = strdup( params->commpath ); gethostname(hostname, sizeof(hostname)); hostname[sizeof(hostname)-1] = '\0'; diff --git a/src/slurm_plugin/slurm_plugin.c b/src/slurm_plugin/slurm_plugin.c index 0989299c..7a2099a1 100644 --- a/src/slurm_plugin/slurm_plugin.c +++ b/src/slurm_plugin/slurm_plugin.c @@ -31,7 +31,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "spindle_launch.h" #include "plugin_utils.h" - +#include "parseloc.h" #include "config.h" #define SPINDLE_USE_SESSION "SPINDLE_USE_SESSION" @@ -704,7 +704,6 @@ static unique_id_t getUniqueID(spank_t spank, int session_enabled) static int fillInArgs(spank_t spank, spindle_args_t *args, int argc, char **argv, unique_id_t unique_id, int session_enabled) { int result; - char *symbolic_commpath, *orig_commpath; char *err_string; args->unique_id = unique_id; @@ -732,12 +731,9 @@ static int fillInArgs(spank_t spank, spindle_args_t *args, int argc, char **argv } - symbolic_commpath = args->commpath; - orig_commpath = parse_location(symbolic_commpath, args->number); - if( !orig_commpath ){ + if( -1 == getFirstValidPath( args->commpaths, &( args->commpath ), args->number ) ){ return -1; } - args->commpath = realize(orig_commpath); current_spank = spank; diff --git a/src/utils/parseloc.c b/src/utils/parseloc.c index bdf5ca1f..01183d01 100644 --- a/src/utils/parseloc.c +++ b/src/utils/parseloc.c @@ -370,6 +370,24 @@ void determineValidCachePaths( uint64_t *validBitIdx, char *origPathList, number free( pathList ); } +int getFirstValidPath( char *origPathList, char **firstValidPath, number_t number ){ + char *saveptr, *candidatePath, *pathList = strdup( origPathList ); + int rc = 0; + + candidatePath = strtok_r( pathList, ":", &saveptr ); + while( NULL != candidatePath ){ + rc = validateCandidatePath( candidatePath, firstValidPath, NULL, NULL, number ); + if( 1 == rc ){ // success + break; + } + *firstValidPath = NULL; + candidatePath = strtok_r( NULL, ":", &saveptr ); + } + free(pathList); + + return (1 == rc) ? 0 : -1; +} + void getValidCachePathByIndex( uint64_t validBitIdx, char **realizedCachePath, char **parsedCachePath, char **symbolicCachePath ){ uint64_t bitoffset = 0; if (!validBitIdx){ diff --git a/src/utils/parseloc.h b/src/utils/parseloc.h index a99409c3..5100364e 100644 --- a/src/utils/parseloc.h +++ b/src/utils/parseloc.h @@ -31,7 +31,7 @@ int is_local_prefix(const char *path, char **local_prefixes); int validateCandidatePath( char *candidatePath, char **realizedPath, char **parsedPath, char **symbolicPath, number_t number ); void determineValidCachePaths( uint64_t *validBitIdx, char *origPathList, number_t number ); void getValidCachePathByIndex( uint64_t validBitIdx, char **realizedCachePath, char **parsedCachePath, char **symbolicCachePath ); - +int getFirstValidPath( char *origPathList, char **firstValidPath, number_t number ); #if defined(__cplusplus) } #endif From bd856facdcc5810ef80ba9a5683b92dc56298e33 Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Fri, 31 Jul 2026 19:51:40 -0700 Subject: [PATCH 03/10] [multiple-commpaths] Adds debugging workflows. See ci-artifacts branch/PR for description. The workflows need be added here as the files are required to be both in the default branch as well as the branch using the workflows. --- .github/workflows/ci-flux-artifacts.yml | 105 +++++++++++++++ .../workflows/ci-serial-arm64-artifacts.yml | 77 +++++++++++ .github/workflows/ci-serial-x86-artifacts.yml | 77 +++++++++++ .github/workflows/ci-slurm-artifacts.yml | 121 +++++++++++++++++ .../workflows/ci-slurm-plugin-artifacts.yml | 123 ++++++++++++++++++ .github/workflows/ci-slurm-srun-artifacts.yml | 120 +++++++++++++++++ 6 files changed, 623 insertions(+) create mode 100644 .github/workflows/ci-flux-artifacts.yml create mode 100644 .github/workflows/ci-serial-arm64-artifacts.yml create mode 100644 .github/workflows/ci-serial-x86-artifacts.yml create mode 100644 .github/workflows/ci-slurm-artifacts.yml create mode 100644 .github/workflows/ci-slurm-plugin-artifacts.yml create mode 100644 .github/workflows/ci-slurm-srun-artifacts.yml diff --git a/.github/workflows/ci-flux-artifacts.yml b/.github/workflows/ci-flux-artifacts.yml new file mode 100644 index 00000000..d6bd5167 --- /dev/null +++ b/.github/workflows/ci-flux-artifacts.yml @@ -0,0 +1,105 @@ +name: ci-flux-artifacts + +on: + workflow_dispatch: + +permissions: + contents: read + packages: read + +jobs: + spindle-flux-ubuntu: + name: Testsuite (Flux, Ubuntu) + environment: Spindle CI + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Check out Spindle + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Setup Docker Compose + uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + with: + version: latest + + - name: Build spindle-flux-ubuntu image + id: flux-ubuntu-build + run: | + cd containers/spindle-flux-ubuntu + docker compose --progress=plain build + + - name: Bring spindle-flux-ubuntu up + id: flux-ubuntu-up + run: | + cd containers/spindle-flux-ubuntu + docker compose up -d --wait --wait-timeout 60 + + - name: Verify munge works in spindle-flux-ubuntu + id: flux-ubuntu-munge + run: | + docker exec node-1 bash -c 'munge -n | unmunge' + + - name: Run spindle-flux-ubuntu testsuite + id: flux-ubuntu-testsuite + run: | + docker exec node-1 bash -c 'cd Spindle-build/testsuite && SPINDLE_DEBUG=3 flux alloc --nodes=${workers} ./runTests --nodes=${workers} --tasks-per-node=3' + + - name: Collect Spindle logs from containers + if: ${{ always() }} + continue-on-error: true + run: | + failed=0 + for node in node-1 node-2 node-3 node-4; do + echo "::group::Collecting logs from $node" + + if ! workdir=$(docker inspect -f '{{.Config.WorkingDir}}' "$node" 2>/dev/null); then + echo "Container $node not found; skipping." + failed=1 + echo "::endgroup::" + continue + fi + + if [ -z "$workdir" ]; then + echo "WorkingDir empty for $node; cannot resolve log path." + failed=1 + echo "::endgroup::" + continue + fi + + src="$workdir/Spindle-build/testsuite" + mkdir -p "spindle-logs/$node" + + if docker cp "$node:$src/." "spindle-logs/$node/"; then + ls -la "spindle-logs/$node/" + else + echo "Copy failed for $node; listing container path:" + docker exec "$node" ls -la "$src" || docker exec "$node" ls -la "$workdir" || true + failed=1 + continue + fi + find "spindle-logs/$node/" -type f ! -name 'spindle_output.*' -delete + + echo "::endgroup::" + done + + echo "Collected tree:" + ls -R spindle-logs/ || true + exit "$failed" + + + - name: Upload Spindle logs + if: ${{ always() }} + uses: actions/upload-artifact@v7 + with: + name: spindle-logs-flux + path: spindle-logs/ + retention-days: 7 + if-no-files-found: warn + + - name: Bring spindle-flux-ubuntu down + id: flux-ubuntu-down + if: ${{ always() }} + continue-on-error: true + run: | + cd containers/spindle-flux-ubuntu + docker compose down diff --git a/.github/workflows/ci-serial-arm64-artifacts.yml b/.github/workflows/ci-serial-arm64-artifacts.yml new file mode 100644 index 00000000..0146a7be --- /dev/null +++ b/.github/workflows/ci-serial-arm64-artifacts.yml @@ -0,0 +1,77 @@ +name: ci-serial-arm64-artifacts + +on: + workflow_dispatch: + +permissions: + contents: read + packages: read + +jobs: + spindle-serial-ubuntu_arm64: + name: Testsuite (Serial, Ubuntu, arm64) + environment: Spindle CI + runs-on: ubuntu-24.04-arm + timeout-minutes: 30 + steps: + - name: Check out Spindle + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Setup Docker Compose + uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + with: + version: latest + + - name: Build spindle-serial-ubuntu image + id: serial-ubuntu-build + run: | + cd containers/spindle-serial-ubuntu + docker compose --progress=plain build + + - name: Bring spindle-serial-ubuntu up + id: serial-ubuntu-up + run: | + cd containers/spindle-serial-ubuntu + docker compose up -d + + - name: Verify munge works in spindle-serial-ubuntu + id: serial-ubuntu-munge + run: | + docker exec spindlenode bash -c 'munge -n | unmunge' + + - name: Run spindle-serial-ubuntu testsuite + id: serial-ubuntu-testsuite + run: | + docker exec spindlenode bash -c 'cd Spindle-build/testsuite && SPINDLE_DEBUG=3 ./runTests' + + - name: Collect Spindle logs from container + if: ${{ always() }} + continue-on-error: true + run: | + mkdir -p spindle-logs + workdir=$(docker inspect -f '{{.Config.WorkingDir}}' spindlenode) + echo "Container WorkingDir: ${workdir:-}" + src="${workdir:?WorkingDir was empty - cannot resolve log path}/Spindle-build/testsuite" + docker cp "spindlenode:$src/." spindle-logs/ || { + echo "Copy failed; listing container path:" + docker exec spindlenode ls -la "$src" || docker exec spindlenode ls -la "$workdir" + exit 1 + } + ls -la spindle-logs/ + + - name: Upload Spindle logs + if: ${{ always() }} + uses: actions/upload-artifact@v7 + with: + name: spindle-logs-serial-arm64 + path: spindle-logs/spindle_output.* + retention-days: 7 + if-no-files-found: warn + + - name: Bring spindle-serial-ubuntu down + id: serial-ubuntu-down + if: ${{ always() }} + continue-on-error: true + run: | + cd containers/spindle-serial-ubuntu + docker compose down diff --git a/.github/workflows/ci-serial-x86-artifacts.yml b/.github/workflows/ci-serial-x86-artifacts.yml new file mode 100644 index 00000000..9f8db79e --- /dev/null +++ b/.github/workflows/ci-serial-x86-artifacts.yml @@ -0,0 +1,77 @@ +name: ci-serial-x86-artifacts + +on: + workflow_dispatch: + +permissions: + contents: read + packages: read + +jobs: + spindle-serial-ubuntu_x86: + name: Testsuite (Serial, Ubuntu, x86) + environment: Spindle CI + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Check out Spindle + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Setup Docker Compose + uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + with: + version: latest + + - name: Build spindle-serial-ubuntu image + id: serial-ubuntu-build + run: | + cd containers/spindle-serial-ubuntu + docker compose --progress=plain build + + - name: Bring spindle-serial-ubuntu up + id: serial-ubuntu-up + run: | + cd containers/spindle-serial-ubuntu + docker compose up -d + + - name: Verify munge works in spindle-serial-ubuntu + id: serial-ubuntu-munge + run: | + docker exec spindlenode bash -c 'munge -n | unmunge' + + - name: Run spindle-serial-ubuntu testsuite + id: serial-ubuntu-testsuite + run: | + docker exec spindlenode bash -c 'cd Spindle-build/testsuite && SPINDLE_DEBUG=3 ./runTests' + + - name: Collect Spindle logs from container + if: ${{ always() }} + continue-on-error: true + run: | + mkdir -p spindle-logs + workdir=$(docker inspect -f '{{.Config.WorkingDir}}' spindlenode) + echo "Container WorkingDir: ${workdir:-}" + src="${workdir:?WorkingDir was empty - cannot resolve log path}/Spindle-build/testsuite" + docker cp "spindlenode:$src/." spindle-logs/ || { + echo "Copy failed; listing container path:" + docker exec spindlenode ls -la "$src" || docker exec spindlenode ls -la "$workdir" + exit 1 + } + ls -la spindle-logs/ + + - name: Upload Spindle logs + if: ${{ always() }} + uses: actions/upload-artifact@v7 + with: + name: spindle-logs-serial-x86 + path: spindle-logs/spindle_output.* + retention-days: 7 + if-no-files-found: warn + + - name: Bring spindle-serial-ubuntu down + id: serial-ubuntu-down + if: ${{ always() }} + continue-on-error: true + run: | + cd containers/spindle-serial-ubuntu + docker compose down diff --git a/.github/workflows/ci-slurm-artifacts.yml b/.github/workflows/ci-slurm-artifacts.yml new file mode 100644 index 00000000..38ee5b21 --- /dev/null +++ b/.github/workflows/ci-slurm-artifacts.yml @@ -0,0 +1,121 @@ +name: ci-slurm-artifacts + +on: + workflow_dispatch: + +permissions: + contents: read + packages: read + +jobs: + spindle-slurm-ubuntu: + name: Testsuite (Slurm rshlaunch, Ubuntu) + environment: Spindle CI + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Check out Spindle + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Setup Docker Compose + uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + with: + version: latest + + - name: Login to GitHub Container Registry + if: ${{ !env.ACT }} + uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate MariaDB configuration + id: slurm-ubuntu-mariadb + run: | + cd containers/spindle-slurm-ubuntu/testing + ./generate_config.sh + + - name: Build spindle-slurm-ubuntu image + id: slurm-ubuntu-build + run: | + cd containers/spindle-slurm-ubuntu/testing + docker compose --progress=plain build + + - name: Bring spindle-slurm-ubuntu up + id: slurm-ubuntu-up + run: | + cd containers/spindle-slurm-ubuntu/testing + docker compose up -d --wait --wait-timeout 120 + + - name: Verify munge works in spindle-slurm-ubuntu + id: slurm-ubuntu-munge + run: | + docker exec slurm-head bash -c 'munge -n | unmunge' + + - name: Run spindle-slurm-ubuntu testsuite + id: slurm-ubuntu-testsuite + run: | + docker exec slurm-head bash -c 'cd Spindle-build/testsuite && SPINDLE_DEBUG=3 salloc -n${workers} -N${workers} ./runTests ${workers}' + + + - name: Collect Spindle logs from containers + if: ${{ always() }} + continue-on-error: true + run: | + failed=0 + for node in slurm-head slurm-node-1 slurm-node-2 slurm-node-3 slurm-node-4; do + echo "::group::Collecting logs from $node" + + if ! workdir=$(docker inspect -f '{{.Config.WorkingDir}}' "$node" 2>/dev/null); then + echo "Container $node not found; skipping." + failed=1 + echo "::endgroup::" + continue + fi + + if [ -z "$workdir" ]; then + echo "WorkingDir empty for $node; cannot resolve log path." + failed=1 + echo "::endgroup::" + continue + fi + + src="$workdir/Spindle-build/testsuite" + mkdir -p "spindle-logs/$node" + + if docker cp "$node:$src/." "spindle-logs/$node/"; then + ls -la "spindle-logs/$node/" + else + echo "Copy failed for $node; listing container path:" + docker exec "$node" ls -la "$src" || docker exec "$node" ls -la "$workdir" || true + failed=1 + continue + fi + find "spindle-logs/$node/" -type f ! -name 'spindle_output.*' -delete + + echo "::endgroup::" + done + + echo "Collected tree:" + ls -R spindle-logs/ || true + exit "$failed" + + + - name: Upload Spindle logs + if: ${{ always() }} + uses: actions/upload-artifact@v7 + with: + name: spindle-logs-slurm + path: spindle-logs/ + retention-days: 7 + if-no-files-found: warn + + + - name: Bring spindle-slurm-ubuntu down + id: slurm-ubuntu-down + if: ${{ always() }} + continue-on-error: true + run: | + cd containers/spindle-slurm-ubuntu/testing + docker compose down diff --git a/.github/workflows/ci-slurm-plugin-artifacts.yml b/.github/workflows/ci-slurm-plugin-artifacts.yml new file mode 100644 index 00000000..aae5b7dd --- /dev/null +++ b/.github/workflows/ci-slurm-plugin-artifacts.yml @@ -0,0 +1,123 @@ +name: ci-slurm-plugin-artifacts + +on: + workflow_dispatch: + +permissions: + contents: read + packages: read + +jobs: + spindle-slurm-plugin-ubuntu: + name: Testsuite (Slurm Plugin, Ubuntu) + environment: Spindle CI + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Check out Spindle + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Setup Docker Compose + uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + with: + version: latest + + - name: Login to GitHub Container Registry + if: ${{ !env.ACT }} + uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate MariaDB configuration + id: slurm-ubuntu-mariadb + run: | + cd containers/spindle-slurm-ubuntu/testing-plugin + ./generate_config.sh + + - name: Build spindle-slurm-plugin-ubuntu image + id: slurm-ubuntu-build + run: | + cd containers/spindle-slurm-ubuntu/testing-plugin + docker compose --progress=plain build + + - name: Bring spindle-slurm-plugin-ubuntu up + id: slurm-ubuntu-up + run: | + cd containers/spindle-slurm-ubuntu/testing-plugin + docker compose up -d --wait --wait-timeout 120 + + - name: Verify munge works in spindle-slurm-plugin-ubuntu + id: slurm-ubuntu-munge + run: | + docker exec slurm-plugin-head bash -c 'munge -n | unmunge' + + - name: Run spindle-slurm-plugin-ubuntu testsuite + id: slurm-ubuntu-testsuite + run: | + docker exec slurm-plugin-head bash -c 'cd Spindle-build/testsuite && SPINDLE_DEBUG=3 salloc -n${workers} -N${workers} ./runTests ${workers}' + + - name: Run spindle-slurm-plugin-ubuntu session testsuite + id: slurm-ubuntu-testsuite-sessions + run: | + docker exec slurm-plugin-head bash -c 'cd Spindle-build/testsuite && SPINDLE_DEBUG=3 salloc -n${workers} -N${workers} --spindle-session ./runTests ${workers}' + + - name: Collect Spindle logs from containers + if: ${{ always() }} + continue-on-error: true + run: | + failed=0 + for node in slurm-head slurm-node-1 slurm-node-2 slurm-node-3 slurm-node-4; do + echo "::group::Collecting logs from $node" + + if ! workdir=$(docker inspect -f '{{.Config.WorkingDir}}' "$node" 2>/dev/null); then + echo "Container $node not found; skipping." + failed=1 + echo "::endgroup::" + continue + fi + + if [ -z "$workdir" ]; then + echo "WorkingDir empty for $node; cannot resolve log path." + failed=1 + echo "::endgroup::" + continue + fi + + src="$workdir/Spindle-build/testsuite" + mkdir -p "spindle-logs/$node" + + if docker cp "$node:$src/." "spindle-logs/$node/"; then + ls -la "spindle-logs/$node/" + else + echo "Copy failed for $node; listing container path:" + docker exec "$node" ls -la "$src" || docker exec "$node" ls -la "$workdir" || true + failed=1 + continue + fi + find "spindle-logs/$node/" -type f ! -name 'spindle_output.*' -delete + + echo "::endgroup::" + done + + echo "Collected tree:" + ls -R spindle-logs/ || true + exit "$failed" + + - name: Upload Spindle logs + if: ${{ always() }} + uses: actions/upload-artifact@v7 + with: + name: spindle-logs-slurm-plugin + path: spindle-logs/ + retention-days: 7 + if-no-files-found: warn + + - name: Bring spindle-slurm-plugin-ubuntu down + id: slurm-ubuntu-down + if: ${{ always() }} + continue-on-error: true + run: | + cd containers/spindle-slurm-ubuntu/testing-plugin + docker compose down diff --git a/.github/workflows/ci-slurm-srun-artifacts.yml b/.github/workflows/ci-slurm-srun-artifacts.yml new file mode 100644 index 00000000..e12077c9 --- /dev/null +++ b/.github/workflows/ci-slurm-srun-artifacts.yml @@ -0,0 +1,120 @@ +name: ci-slurm-srun-artifacts + +on: + workflow_dispatch: + +permissions: + contents: read + packages: read + +jobs: + spindle-slurm-srun-ubuntu: + name: Testsuite (Slurm srun, Ubuntu) + environment: Spindle CI + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Check out Spindle + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Setup Docker Compose + uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + with: + version: latest + + - name: Login to GitHub Container Registry + if: ${{ !env.ACT }} + uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate MariaDB configuration + id: slurm-ubuntu-mariadb + run: | + cd containers/spindle-slurm-ubuntu/testing-srun + ./generate_config.sh + + - name: Build spindle-slurm-ubuntu image + id: slurm-ubuntu-build + run: | + cd containers/spindle-slurm-ubuntu/testing-srun + docker compose --progress=plain build + + - name: Bring spindle-slurm-ubuntu up + id: slurm-ubuntu-up + run: | + cd containers/spindle-slurm-ubuntu/testing-srun + docker compose up -d --wait --wait-timeout 120 + + - name: Verify munge works in spindle-slurm-srun-ubuntu + id: slurm-ubuntu-munge + run: | + docker exec slurm-srun-head bash -c 'munge -n | unmunge' + + - name: Run spindle-slurm-srun-ubuntu testsuite + id: slurm-ubuntu-testsuite + run: | + docker exec slurm-srun-head bash -c 'cd Spindle-build/testsuite && SPINDLE_DEBUG=3 salloc -n${workers} -N${workers} ./runTests ${workers}' + + - name: Collect Spindle logs from containers + if: ${{ always() }} + continue-on-error: true + run: | + failed=0 + for node in slurm-head slurm-srun-node-1 slurm-srun-node-1 slurm-srun-node-2 slurm-srun-node-3 slurm-srun-node-4; do + echo "::group::Collecting logs from $node" + + if ! workdir=$(docker inspect -f '{{.Config.WorkingDir}}' "$node" 2>/dev/null); then + echo "Container $node not found; skipping." + failed=1 + echo "::endgroup::" + continue + fi + + if [ -z "$workdir" ]; then + echo "WorkingDir empty for $node; cannot resolve log path." + failed=1 + echo "::endgroup::" + continue + fi + + src="$workdir/Spindle-build/testsuite" + mkdir -p "spindle-logs/$node" + + if docker cp "$node:$src/." "spindle-logs/$node/"; then + ls -la "spindle-logs/$node/" + else + echo "Copy failed for $node; listing container path:" + docker exec "$node" ls -la "$src" || docker exec "$node" ls -la "$workdir" || true + failed=1 + continue + fi + find "spindle-logs/$node/" -type f ! -name 'spindle_output.*' -delete + + echo "::endgroup::" + done + + echo "Collected tree:" + ls -R spindle-logs/ || true + exit "$failed" + + + - name: Upload Spindle logs + if: ${{ always() }} + uses: actions/upload-artifact@v7 + with: + name: spindle-logs-slurm-srun + path: spindle-logs/ + retention-days: 7 + if-no-files-found: warn + + + - name: Bring spindle-slurm-ubuntu down + id: slurm-ubuntu-down + if: ${{ always() }} + continue-on-error: true + run: | + cd containers/spindle-slurm-ubuntu/testing-srun + docker compose down From 4075f1d8db808782919cdabe4de1b27da12e30a1 Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Wed, 12 Aug 2026 06:22:54 -0700 Subject: [PATCH 04/10] Update .github/workflows/ci-slurm-plugin-artifacts.yml For the slurm-plugin case, fix copy/paste error by updating container names to those found in docker-compose.yml. (h/t Nick) Co-authored-by: Nicholas Chaimov --- .github/workflows/ci-slurm-plugin-artifacts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-slurm-plugin-artifacts.yml b/.github/workflows/ci-slurm-plugin-artifacts.yml index aae5b7dd..3a1ee0c0 100644 --- a/.github/workflows/ci-slurm-plugin-artifacts.yml +++ b/.github/workflows/ci-slurm-plugin-artifacts.yml @@ -68,7 +68,7 @@ jobs: continue-on-error: true run: | failed=0 - for node in slurm-head slurm-node-1 slurm-node-2 slurm-node-3 slurm-node-4; do + for node in slurm-plugin-head slurm-plugin-node-1 slurm-plugin-node-2 slurm-plugin-node-3 slurm-plugin-node-4; do echo "::group::Collecting logs from $node" if ! workdir=$(docker inspect -f '{{.Config.WorkingDir}}' "$node" 2>/dev/null); then From 69659c49390a92fdd8c8b6747e8d136943cbe57d Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Wed, 12 Aug 2026 06:25:27 -0700 Subject: [PATCH 05/10] Update configure.common.ac Typo fix. h/t Nick. Co-authored-by: Nicholas Chaimov --- configure.common.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.common.ac b/configure.common.ac index 010b050f..724e7caa 100644 --- a/configure.common.ac +++ b/configure.common.ac @@ -30,7 +30,7 @@ AC_ARG_WITH(cachepath, [AC_MSG_ERROR(use --with-cachepaths=DIRS (plural) instead of --with-cachepath=DIR to specify one or more cache paths)], []) AC_ARG_WITH(commpaths, - [AS_HELP_STRING([--with-compaths=DIR],[Colon-separated list of candidate paths for back-end communication and housekeeping])], + [AS_HELP_STRING([--with-commpaths=DIR],[Colon-separated list of candidate paths for back-end communication and housekeeping])], [COMMPATHS=${withval}], [COMMPATHS=$DEFAULT_LOC]) AC_ARG_WITH(default-local-prefix, From 4e0ac61a003f3f20a8135bac74463905f838663c Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Wed, 19 Aug 2026 17:51:53 -0700 Subject: [PATCH 06/10] Update src/slurm_plugin/plugin_utils.c h/t Nick. Co-authored-by: Nicholas Chaimov --- src/slurm_plugin/plugin_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurm_plugin/plugin_utils.c b/src/slurm_plugin/plugin_utils.c index 0a8f0eaf..e97fc85f 100644 --- a/src/slurm_plugin/plugin_utils.c +++ b/src/slurm_plugin/plugin_utils.c @@ -302,7 +302,7 @@ int isFEHost(char **hostlist, unsigned int num_hosts) static char* exitSocketPath(spindle_args_t *params) { - char *realized_dir, *socket_path = NULL; + char *realized_dir = NULL, *socket_path = NULL; char session_id_str[32]; size_t socket_path_len; From 55b60256948e18eeea4b5af74f9f042416ec7ccf Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Wed, 19 Aug 2026 19:19:39 -0700 Subject: [PATCH 07/10] Fixes buffer truncation and handles getFirstValidPath return code. src/client/client_comlib/client_api.c message.data (via buffer) is allocated 2*(MAX_PATH_LEN+1) bytes on the stack. message.data now truncated to 2*(MAX_PATH_LEN+1)-1 after the message is populated. src/fe/startup/parse_launcher.cc Both getFirstValidPath() and getApplicationArgsFE() were ignoring return values. Both now immediately return -1 on error, and the enclosing funciton signature has been converted from void to int. --- src/client/client_comlib/client_api.c | 7 ++++--- src/fe/startup/parse_launcher.cc | 18 ++++++++++++++---- src/fe/startup/parse_launcher.h | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/client/client_comlib/client_api.c b/src/client/client_comlib/client_api.c index 07735226..697ef619 100644 --- a/src/client/client_comlib/client_api.c +++ b/src/client/client_comlib/client_api.c @@ -43,7 +43,6 @@ int send_cachepath_query( int fd, char **chosen_realized_cachepath, char **chose int rc = 0; ldcs_message_t message; char buffer[2*(MAX_PATH_LEN+1)]; - buffer[MAX_PATH_LEN] = '\0'; message.header.type = LDCS_MSG_CHOSEN_CACHEPATH_REQUEST; @@ -70,8 +69,10 @@ int send_cachepath_query( int fd, char **chosen_realized_cachepath, char **chose err_printf("Got unexpected message of type %d\n", (int) message.header.type); return -1; } - char *local_crc = spindle_strdup( buffer ); - char *local_cpc = spindle_strdup( &buffer[ strlen(local_crc) + 1 ] ); + // message.data contains two strings, each of which is no more than MAX_PATH_LEN bytes. + message.data[2*(MAX_PATH_LEN+1)-1] = '\0'; + char *local_crc = spindle_strdup( message.data ); + char *local_cpc = spindle_strdup( &message.data[ strlen(message.data) + 1 ] ); if( chosen_realized_cachepath ){ *chosen_realized_cachepath = local_crc; } diff --git a/src/fe/startup/parse_launcher.cc b/src/fe/startup/parse_launcher.cc index e8226b73..9edb3f23 100644 --- a/src/fe/startup/parse_launcher.cc +++ b/src/fe/startup/parse_launcher.cc @@ -286,13 +286,16 @@ void ModifyArgv::print_err(string msg) fprintf(stderr, " spindle mpirun -np 4 spindlemarker a.out arg1 arg2\n\n"); } -void ModifyArgv::modifyCmdLine() +int ModifyArgv::modifyCmdLine() { char options_str[32]; snprintf(options_str, 32, "%lu", (unsigned long) params->opts); string options(options_str); - getFirstValidPath( params->commpaths, &( params->commpath ), params->number ); + int rc = getFirstValidPath( params->commpaths, &( params->commpath ), params->number ); + if( rc != 0 ){ + return -1; + } string commpath(params->commpath); char number_str[32]; @@ -324,7 +327,10 @@ void ModifyArgv::modifyCmdLine() #else char **a_argv; int a_argc; - getApplicationArgsFE(params, &a_argc, &a_argv); + rc = getApplicationArgsFE(params, &a_argc, &a_argv); + if( rc != 0 ){ + return -1; + } for (int i = 0; i < a_argc; i++) new_argv[n++] = a_argv[i]; (void) default_libstr; (void) intercept_libstr; //Not needed on linux @@ -337,6 +343,7 @@ void ModifyArgv::modifyCmdLine() new_argv[n] = NULL; assert(n < new_argv_size); new_argc = n; + return 0; } bool ModifyArgv::getNewArgv(int &newargc, char** &newargv) @@ -368,7 +375,10 @@ bool ModifyArgv::getNewArgv(int &newargc, char** &newargv) return false; } - modifyCmdLine(); + int rc = modifyCmdLine(); + if( rc == -1 ){ + return false; + } if (spindle_debug_prints) { string new_cmdline = string(new_argv[0]); diff --git a/src/fe/startup/parse_launcher.h b/src/fe/startup/parse_launcher.h index 89e57bd3..205413ca 100644 --- a/src/fe/startup/parse_launcher.h +++ b/src/fe/startup/parse_launcher.h @@ -43,7 +43,7 @@ class ModifyArgv { void print_err(std::string str); bool autodetectParser(); bool chooseParser(); - void modifyCmdLine(); + int modifyCmdLine(); public: ModifyArgv(int argc, char **argv, From 6dbbabae2140313b4754ddfc89e9dbb4172f1dc6 Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Wed, 19 Aug 2026 20:20:17 -0700 Subject: [PATCH 08/10] Supports singular and plural forms of commpath[s] and cachepath[s] Handles configure-, build-, and runtime options. --- configure.common.ac | 12 ++++++++---- src/fe/startup/config_mgr.cc | 10 +++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/configure.common.ac b/configure.common.ac index 724e7caa..c2ec9f59 100644 --- a/configure.common.ac +++ b/configure.common.ac @@ -18,21 +18,25 @@ AC_ARG_WITH(default-num-ports, [NUM_COBO_PORTS=${withval}], [NUM_COBO_PORTS=$DEFAULT_NUM_COBO_PORTS]) AC_ARG_WITH(localstorage, - [AS_HELP_STRING([--with-localstorage=DIR (obsolete)],[Use --with-cachepaths and --with-commpath instead.])], - [AC_MSG_ERROR(requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpath instead.)], + [AS_HELP_STRING([--with-localstorage=DIR (obsolete)],[Use --with-cachepaths and --with-commpaths instead.])], + [AC_MSG_ERROR(requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpaths instead.)], []) AC_ARG_WITH(cachepaths, [AS_HELP_STRING([--with-cachepaths=DIR],[Colon-separated list of potential back-end cache directories])], [CACHEPATHS=${withval}], [CACHEPATHS=$DEFAULT_LOC]) AC_ARG_WITH(cachepath, - [[],[]], - [AC_MSG_ERROR(use --with-cachepaths=DIRS (plural) instead of --with-cachepath=DIR to specify one or more cache paths)], + [AS_HELP_STRING([--with-cachepath=DIR],[Synonym for --with-cachepaths ])], + [CACHEPATHS=${withval}], []) AC_ARG_WITH(commpaths, [AS_HELP_STRING([--with-commpaths=DIR],[Colon-separated list of candidate paths for back-end communication and housekeeping])], [COMMPATHS=${withval}], [COMMPATHS=$DEFAULT_LOC]) +AC_ARG_WITH(commpath, + [AS_HELP_STRING([--with-commpath=DIR],[Synonym for --with-commpaths])], + [COMMPATHS=${withval}], + []) AC_ARG_WITH(default-local-prefix, [AS_HELP_STRING([--with-default-local-prefix=DIRS],[Colon-seperated list of directories that Spindle will not cache files out of])], [SPINDLE_LOCAL_PREFIX=${withval}], diff --git a/src/fe/startup/config_mgr.cc b/src/fe/startup/config_mgr.cc index 02235648..838783ec 100644 --- a/src/fe/startup/config_mgr.cc +++ b/src/fe/startup/config_mgr.cc @@ -52,12 +52,16 @@ using namespace std; #if defined(COMMPATHS) #define SPINDLE_COMMPATHS_STR COMMPATHS +#elif defined(COMMPATH) +#define SPINDLE_COMMPATHS_STR COMMPATH #else #define SPINDLE_COMMPATHS_STR "$TMPDIR" #endif #if defined(CACHEPATHS) #define SPINDLE_CACHEPATHS_STR CACHEPATHS +#elif defined(CACHEPATH) +#define SPINDLE_CACHEPATHS_STR CACHEPATH #else #define SPINDLE_CACHEPATHS_STR "$TMPDIR" #endif @@ -274,9 +278,13 @@ void initOptionsList() { confStrip, "strip", shortStrip, groupMisc, cvBool, {}, "true", "Strip debug and symbol information from binaries before distributing them." }, { confCommPaths, "commpaths", shortCommPaths, groupMisc, cvString, {}, SPINDLE_COMMPATHS_STR, - "Back-end directory communication and housekeeping. Should be a non-shared location such as a ramdisk." }, + "Colon-separated list of candidate paths for back-end communication and housekeeping. Should be a non-shared location such as a ramdisk." }, + { confCommPaths, "commpath", shortNone, groupMisc, cvString, {}, SPINDLE_COMMPATHS_STR, + "Synonym for --commpaths." }, { confCachePaths, "cachepaths", shortCachePaths, groupMisc, cvString, {}, SPINDLE_CACHEPATHS_STR, "Colon-separated list of candidate paths for cached libraries."}, + { confCachePaths, "cachepath", shortNone, groupMisc, cvString, {}, SPINDLE_CACHEPATHS_STR, + "Synonym for --cachepaths." }, { confNoclean, "noclean", shortNoClean, groupMisc, cvBool, {}, "false", "Don't remove local file cache after execution." }, { confDisableLogging, "disable-logging", shortDisableLogging, groupMisc, cvBool, {}, DISABLE_LOGGING_STR, From c2193940a5f5bcb95799be94e5f265bbd048185c Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Thu, 20 Aug 2026 12:46:57 -0700 Subject: [PATCH 09/10] Changes default session path to "$TMPDIR/spindle/session" --- src/flux/sessionmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flux/sessionmgr.c b/src/flux/sessionmgr.c index a936c46b..1267d302 100644 --- a/src/flux/sessionmgr.c +++ b/src/flux/sessionmgr.c @@ -106,7 +106,7 @@ char **strip_start_from_argv(int argc, char **argv) return new_argv; } -#define SESSIONPATH "/tmp/spindle/session" +#define SESSIONPATH "$TMPDIR/spindle/session" const char *get_session_dir() { /* This function was originally designed to return a realized version of COMMPATH. From 59f5beeefde1f7cd4fbdcdc7ee7518b647294c4a Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Fri, 21 Aug 2026 09:44:03 -0700 Subject: [PATCH 10/10] [sessionpaths] Adds explicit parameter for session paths. The session path had originally been derived from the local storage path. With the commpath/cachepath split, it was briefly a hardcoded path, and we discussed deriving sessionpath from commpath. However, that requires users to remember to specify the same commpaths for every session job (as well as the session intialization), and things will break if an unmounted path at the head of the commpath list becomes available during the session. The simplest solution is to leverage the existing spindle_mkdir() and cleanup code with the persistent session initialization job creating the directory and cleaning it up on exit. spindle_mkdir() was built twice, with and without directory tracking, and the front end needed to link to both (the logger requires tracking be disabled). The solution was to get rid of the comile time flag and parameterize tracking in the function signature. --- config.h.in | 3 + configure | 42 +- configure.common.ac | 9 + src/client/beboot/spindle_bootstrap.c | 3 +- src/client/config.h.in | 3 + src/client/configure | 42 +- src/fe/config.h.in | 3 + src/fe/configure | 42 +- src/fe/startup/Makefile.am | 16 +- src/fe/startup/Makefile.in | 404 +++++++----------- src/fe/startup/config_mgr.cc | 20 + src/fe/startup/config_mgr.h | 2 + src/fe/startup/spindle_session.cc | 123 ++++-- src/flux/Makefile.am | 4 +- src/flux/Makefile.in | 7 +- src/flux/main.cc | 59 ++- src/flux/sessionmgr.c | 17 +- src/include/spindle_launch.h | 3 + src/logging/spindle_logc.c | 5 +- src/server/auditserver/cleanup_proc.cc | 38 +- src/server/auditserver/cleanup_proc.h | 4 +- .../auditserver/ldcs_audit_server_filemngt.c | 13 +- .../auditserver/ldcs_audit_server_filemngt.h | 2 +- .../auditserver/ldcs_audit_server_handlers.c | 2 +- .../auditserver/ldcs_audit_server_process.c | 17 +- .../auditserver/ldcs_audit_server_process.h | 2 + src/server/comlib/ldcs_api_pipe.c | 5 +- src/server/config.h.in | 3 + src/server/configure | 42 +- src/server/startup/Makefile.am | 2 +- src/server/startup/Makefile.in | 2 +- src/slurm_plugin/Makefile.am | 2 +- src/slurm_plugin/Makefile.in | 4 +- src/slurm_plugin/plugin_utils.c | 5 +- src/utils/parseloc.c | 5 +- src/utils/spindle_mkdir.c | 36 +- testsuite/run_driver_template | 2 +- 37 files changed, 616 insertions(+), 377 deletions(-) diff --git a/config.h.in b/config.h.in index 4ebf63f2..6d724489 100644 --- a/config.h.in +++ b/config.h.in @@ -144,6 +144,9 @@ /* Default mode for rsh launch */ #undef RSHLAUNCH_ENABLED +/* Colon-separated list of candidate paths for session management */ +#undef SESSIONPATHS + /* Default mode for slurm launch */ #undef SLURMLAUNCH_ENABLED diff --git a/configure b/configure index 800f4ee8..f47c68dd 100755 --- a/configure +++ b/configure @@ -851,6 +851,9 @@ with_localstorage with_cachepaths with_cachepath with_commpaths +with_commpath +with_sessionpaths +with_sessionpath with_default_local_prefix with_testrm with_rm @@ -1596,12 +1599,16 @@ Optional Packages: Number of TCP/IP ports to scan for Spindle server communication --with-localstorage=DIR (obsolete) - Use --with-cachepaths and --with-commpath instead. + Use --with-cachepaths and --with-commpaths instead. --with-cachepaths=DIR Colon-separated list of potential back-end cache directories -, - --with-compaths=DIR Colon-separated list of candidate paths for back-end + --with-cachepath=DIR Synonym for --with-cachepaths + --with-commpaths=DIR Colon-separated list of candidate paths for back-end communication and housekeeping + --with-commpath=DIR Synonym for --with-commpaths + --with-sessionpaths=DIR Colon-separated list of candidate paths for session + management + --with-sessionpath=DIR Synonym for --with-sessionpaths --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -16675,7 +16682,7 @@ fi # Check whether --with-localstorage was given. if test "${with_localstorage+set}" = set; then : - withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpath instead." "$LINENO" 5 + withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpaths instead." "$LINENO" 5 fi @@ -16689,7 +16696,7 @@ fi # Check whether --with-cachepath was given. if test "${with_cachepath+set}" = set; then : - withval=$with_cachepath; as_fn_error $? "use --with-cachepaths=DIRS (plural) instead of --with-cachepath=DIR to specify one or more cache paths" "$LINENO" 5 + withval=$with_cachepath; CACHEPATHS=${withval} fi @@ -16701,6 +16708,26 @@ else fi +# Check whether --with-commpath was given. +if test "${with_commpath+set}" = set; then : + withval=$with_commpath; COMMPATHS=${withval} +fi + + +# Check whether --with-sessionpaths was given. +if test "${with_sessionpaths+set}" = set; then : + withval=$with_sessionpaths; SESSIONPATHS=${withval} +else + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} +fi + + # Check whether --with-default-local-prefix was given. if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} @@ -16734,6 +16761,11 @@ cat >>confdefs.h <<_ACEOF _ACEOF +cat >>confdefs.h <<_ACEOF +#define SESSIONPATHS "$SESSIONPATHS" +_ACEOF + + cat >>confdefs.h <<_ACEOF #define SPINDLE_LOCAL_PREFIX "$SPINDLE_LOCAL_PREFIX" _ACEOF diff --git a/configure.common.ac b/configure.common.ac index 36f82883..94395322 100644 --- a/configure.common.ac +++ b/configure.common.ac @@ -37,6 +37,14 @@ AC_ARG_WITH(commpath, [AS_HELP_STRING([--with-commpath=DIR],[Synonym for --with-commpaths])], [COMMPATHS=${withval}], []) +AC_ARG_WITH(sessionpaths, + [AS_HELP_STRING([--with-sessionpaths=DIR],[Colon-separated list of candidate paths for session management])], + [SESSIONPATHS=${withval}], + [SESSIONPATHS=$COMMPATHS]) +AC_ARG_WITH(sessionpath, + [AS_HELP_STRING([--with-sessionpath=DIR],[Synonym for --with-sessionpaths])], + [SESSIONPATHS=${withval}], + []) AC_ARG_WITH(default-local-prefix, [AS_HELP_STRING([--with-default-local-prefix=DIRS],[Colon-seperated list of directories that Spindle will not cache files out of])], [SPINDLE_LOCAL_PREFIX=${withval}], @@ -46,6 +54,7 @@ AC_DEFINE_UNQUOTED([NUM_COBO_PORTS],[$NUM_COBO_PORTS],[Number of ports for COBO AC_DEFINE_UNQUOTED([SPINDLE_MAX_PORT],[$(($SPINDLE_PORT + $NUM_COBO_PORTS - 1))],[The maximum port value]) AC_DEFINE_UNQUOTED([COMMPATHS],"[$COMMPATHS]",[Colon-separated list of candidate paths for back-end communication and housekeeping]) AC_DEFINE_UNQUOTED([CACHEPATHS],"[$CACHEPATHS]",[Colon-separated list of potential back-end cache directories]) +AC_DEFINE_UNQUOTED([SESSIONPATHS],"[$SESSIONPATHS]",[Colon-separated list of candidate paths for session management]) AC_DEFINE_UNQUOTED([SPINDLE_LOCAL_PREFIX],"[$SPINDLE_LOCAL_PREFIX]",[The default colon-separated list of directories that Spindle will not cache files out of]) TESTRM=unknown diff --git a/src/client/beboot/spindle_bootstrap.c b/src/client/beboot/spindle_bootstrap.c index b814c5e2..ac3b13f4 100644 --- a/src/client/beboot/spindle_bootstrap.c +++ b/src/client/beboot/spindle_bootstrap.c @@ -25,6 +25,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #include "spindle_debug.h" #include "ldcs_api.h" @@ -86,7 +87,7 @@ static char *default_subaudit_libstr = libstr_biter_subaudit; #error Unknown connection type #endif -extern int spindle_mkdir(char *path); +extern int spindle_mkdir(char *path, bool delete_on_exit); extern char *parse_location(char *loc, number_t number); extern char *realize(char *path); diff --git a/src/client/config.h.in b/src/client/config.h.in index 5b61f2f3..cf0e0091 100644 --- a/src/client/config.h.in +++ b/src/client/config.h.in @@ -131,6 +131,9 @@ /* Default mode for rsh launch */ #undef RSHLAUNCH_ENABLED +/* Colon-separated list of candidate paths for session management */ +#undef SESSIONPATHS + /* Default mode for slurm launch */ #undef SLURMLAUNCH_ENABLED diff --git a/src/client/configure b/src/client/configure index 290d99d8..0b40c361 100755 --- a/src/client/configure +++ b/src/client/configure @@ -814,6 +814,9 @@ with_localstorage with_cachepaths with_cachepath with_commpaths +with_commpath +with_sessionpaths +with_sessionpath with_default_local_prefix with_testrm with_rm @@ -1538,12 +1541,16 @@ Optional Packages: Number of TCP/IP ports to scan for Spindle server communication --with-localstorage=DIR (obsolete) - Use --with-cachepaths and --with-commpath instead. + Use --with-cachepaths and --with-commpaths instead. --with-cachepaths=DIR Colon-separated list of potential back-end cache directories -, - --with-compaths=DIR Colon-separated list of candidate paths for back-end + --with-cachepath=DIR Synonym for --with-cachepaths + --with-commpaths=DIR Colon-separated list of candidate paths for back-end communication and housekeeping + --with-commpath=DIR Synonym for --with-commpaths + --with-sessionpaths=DIR Colon-separated list of candidate paths for session + management + --with-sessionpath=DIR Synonym for --with-sessionpaths --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -12600,7 +12607,7 @@ fi # Check whether --with-localstorage was given. if test "${with_localstorage+set}" = set; then : - withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpath instead." "$LINENO" 5 + withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpaths instead." "$LINENO" 5 fi @@ -12614,7 +12621,7 @@ fi # Check whether --with-cachepath was given. if test "${with_cachepath+set}" = set; then : - withval=$with_cachepath; as_fn_error $? "use --with-cachepaths=DIRS (plural) instead of --with-cachepath=DIR to specify one or more cache paths" "$LINENO" 5 + withval=$with_cachepath; CACHEPATHS=${withval} fi @@ -12626,6 +12633,26 @@ else fi +# Check whether --with-commpath was given. +if test "${with_commpath+set}" = set; then : + withval=$with_commpath; COMMPATHS=${withval} +fi + + +# Check whether --with-sessionpaths was given. +if test "${with_sessionpaths+set}" = set; then : + withval=$with_sessionpaths; SESSIONPATHS=${withval} +else + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} +fi + + # Check whether --with-default-local-prefix was given. if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} @@ -12659,6 +12686,11 @@ cat >>confdefs.h <<_ACEOF _ACEOF +cat >>confdefs.h <<_ACEOF +#define SESSIONPATHS "$SESSIONPATHS" +_ACEOF + + cat >>confdefs.h <<_ACEOF #define SPINDLE_LOCAL_PREFIX "$SPINDLE_LOCAL_PREFIX" _ACEOF diff --git a/src/fe/config.h.in b/src/fe/config.h.in index 0fb0e6f0..6dc219ff 100644 --- a/src/fe/config.h.in +++ b/src/fe/config.h.in @@ -176,6 +176,9 @@ /* Directory to store key files in */ #undef SEC_KEYDIR +/* Colon-separated list of candidate paths for session management */ +#undef SESSIONPATHS + /* Default mode for slurm launch */ #undef SLURMLAUNCH_ENABLED diff --git a/src/fe/configure b/src/fe/configure index 293bcfee..12bcbc66 100755 --- a/src/fe/configure +++ b/src/fe/configure @@ -835,6 +835,9 @@ with_localstorage with_cachepaths with_cachepath with_commpaths +with_commpath +with_sessionpaths +with_sessionpath with_default_local_prefix with_testrm with_rm @@ -1576,12 +1579,16 @@ Optional Packages: Number of TCP/IP ports to scan for Spindle server communication --with-localstorage=DIR (obsolete) - Use --with-cachepaths and --with-commpath instead. + Use --with-cachepaths and --with-commpaths instead. --with-cachepaths=DIR Colon-separated list of potential back-end cache directories -, - --with-compaths=DIR Colon-separated list of candidate paths for back-end + --with-cachepath=DIR Synonym for --with-cachepaths + --with-commpaths=DIR Colon-separated list of candidate paths for back-end communication and housekeeping + --with-commpath=DIR Synonym for --with-commpaths + --with-sessionpaths=DIR Colon-separated list of candidate paths for session + management + --with-sessionpath=DIR Synonym for --with-sessionpaths --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -16450,7 +16457,7 @@ fi # Check whether --with-localstorage was given. if test "${with_localstorage+set}" = set; then : - withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpath instead." "$LINENO" 5 + withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpaths instead." "$LINENO" 5 fi @@ -16464,7 +16471,7 @@ fi # Check whether --with-cachepath was given. if test "${with_cachepath+set}" = set; then : - withval=$with_cachepath; as_fn_error $? "use --with-cachepaths=DIRS (plural) instead of --with-cachepath=DIR to specify one or more cache paths" "$LINENO" 5 + withval=$with_cachepath; CACHEPATHS=${withval} fi @@ -16476,6 +16483,26 @@ else fi +# Check whether --with-commpath was given. +if test "${with_commpath+set}" = set; then : + withval=$with_commpath; COMMPATHS=${withval} +fi + + +# Check whether --with-sessionpaths was given. +if test "${with_sessionpaths+set}" = set; then : + withval=$with_sessionpaths; SESSIONPATHS=${withval} +else + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} +fi + + # Check whether --with-default-local-prefix was given. if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} @@ -16509,6 +16536,11 @@ cat >>confdefs.h <<_ACEOF _ACEOF +cat >>confdefs.h <<_ACEOF +#define SESSIONPATHS "$SESSIONPATHS" +_ACEOF + + cat >>confdefs.h <<_ACEOF #define SPINDLE_LOCAL_PREFIX "$SPINDLE_LOCAL_PREFIX" _ACEOF diff --git a/src/fe/startup/Makefile.am b/src/fe/startup/Makefile.am index c4daceb3..fe51107f 100644 --- a/src/fe/startup/Makefile.am +++ b/src/fe/startup/Makefile.am @@ -1,13 +1,12 @@ bin_PROGRAMS = spindle -lib_LTLIBRARIES = libspindlefe.la noinst_LTLIBRARIES = libspindlefe_static.la include_HEADERS = $(top_srcdir)/../include/spindle_launch.h AM_CPPFLAGS = -I$(top_srcdir)/../logging -CORE_SOURCES = spindle_fe.cc parseargs.cc config_parser.cc config_mgr.cc parse_preload.cc $(top_srcdir)/../utils/pathfn.c $(top_srcdir)/../utils/keyfile.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/rshlaunch.c -CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../include -I$(top_srcdir)/comlib -I$(top_srcdir)/../server/cache -I$(top_srcdir)/../server/comlib -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DBINDIR=\"$(pkglibexecdir)\" -DLIBEXECDIR=\"$(pkglibexecdir)\" -DPROGLIBDIR=\"$(pkglibdir)\" -DPKGSYSCONFDIR=\"$(PKGSYSCONF_DIR)\" +CORE_SOURCES = spindle_fe.cc parseargs.cc config_parser.cc config_mgr.cc parse_preload.cc $(top_srcdir)/../utils/pathfn.c $(top_srcdir)/../utils/keyfile.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/rshlaunch.c $(top_srcdir)/../utils/spindle_mkdir.c $(top_srcdir)/../server/auditserver/cleanup_proc.cc +CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../include -I$(top_srcdir)/comlib -I$(top_srcdir)/../server/cache -I$(top_srcdir)/../server/comlib -I$(top_srcdir)/../server/auditserver -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DBINDIR=\"$(pkglibexecdir)\" -DLIBEXECDIR=\"$(pkglibexecdir)\" -DPROGLIBDIR=\"$(pkglibdir)\" -DPKGSYSCONFDIR=\"$(PKGSYSCONF_DIR)\" CORE_LDADD = $(top_builddir)/logging/libspindleflogc.la -lpthread if COBO CORE_LDADD += $(top_builddir)/comlib/libfe_cobo.la $(top_builddir)/cobo/libldcs_cobo.la @@ -17,14 +16,9 @@ CORE_LDADD += $(top_builddir)/comlib/libfe_msocket.la endif CORE_LDADD += $(MUNGE_DYN_LIB) $(GCRYPT_LIBS) -libspindlefe_la_CPPFLAGS = $(CORE_CPPFLAGS) -DSPINDLEFELIB -libspindlefe_la_SOURCES = $(CORE_SOURCES) -libspindlefe_la_LIBADD = $(CORE_LDADD) -libspindlefe_la_LDFLAGS = -version-info $(SPINDLEFE_LIB_VERSION) - -libspindlefe_static_la_CPPFLAGS = $(libspindlefe_la_CPPFLAGS) -libspindlefe_static_la_SOURCES = $(libspindlefe_la_SOURCES) -libspindlefe_static_la_LIBADD = $(libspindlefe_la_LIBADD) +libspindlefe_static_la_CPPFLAGS = $(CORE_CPPFLAGS) -DSPINDLEFELIB +libspindlefe_static_la_SOURCES = $(CORE_SOURCES) +libspindlefe_static_la_LIBADD = $(CORE_LDADD) spindle_CPPFLAGS = $(CORE_CPPFLAGS) -DSPINDLEEXE diff --git a/src/fe/startup/Makefile.in b/src/fe/startup/Makefile.in index 0f678858..85fa9fa9 100644 --- a/src/fe/startup/Makefile.in +++ b/src/fe/startup/Makefile.in @@ -118,63 +118,16 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(includedir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" PROGRAMS = $(bin_PROGRAMS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(top_builddir)/logging/libspindleflogc.la \ $(am__append_1) $(am__append_2) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -libspindlefe_la_DEPENDENCIES = $(am__DEPENDENCIES_2) +libspindlefe_static_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am__dirstamp = $(am__leading_dot)dirstamp -am__objects_1 = libspindlefe_la-spindle_fe.lo \ - libspindlefe_la-parseargs.lo libspindlefe_la-config_parser.lo \ - libspindlefe_la-config_mgr.lo libspindlefe_la-parse_preload.lo \ - $(top_builddir)/../utils/libspindlefe_la-pathfn.lo \ - $(top_builddir)/../utils/libspindlefe_la-keyfile.lo \ - $(top_builddir)/../utils/libspindlefe_la-parseloc.lo \ - $(top_builddir)/../utils/libspindlefe_la-rshlaunch.lo -am_libspindlefe_la_OBJECTS = $(am__objects_1) -libspindlefe_la_OBJECTS = $(am_libspindlefe_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -libspindlefe_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) $(libspindlefe_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) -libspindlefe_static_la_DEPENDENCIES = $(am__DEPENDENCIES_3) -am__objects_2 = libspindlefe_static_la-spindle_fe.lo \ +am__objects_1 = libspindlefe_static_la-spindle_fe.lo \ libspindlefe_static_la-parseargs.lo \ libspindlefe_static_la-config_parser.lo \ libspindlefe_static_la-config_mgr.lo \ @@ -182,10 +135,15 @@ am__objects_2 = libspindlefe_static_la-spindle_fe.lo \ $(top_builddir)/../utils/libspindlefe_static_la-pathfn.lo \ $(top_builddir)/../utils/libspindlefe_static_la-keyfile.lo \ $(top_builddir)/../utils/libspindlefe_static_la-parseloc.lo \ - $(top_builddir)/../utils/libspindlefe_static_la-rshlaunch.lo -am__objects_3 = $(am__objects_2) -am_libspindlefe_static_la_OBJECTS = $(am__objects_3) + $(top_builddir)/../utils/libspindlefe_static_la-rshlaunch.lo \ + $(top_builddir)/../utils/libspindlefe_static_la-spindle_mkdir.lo \ + $(top_builddir)/../server/auditserver/libspindlefe_static_la-cleanup_proc.lo +am_libspindlefe_static_la_OBJECTS = $(am__objects_1) libspindlefe_static_la_OBJECTS = $(am_libspindlefe_static_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am__spindle_SOURCES_DIST = spindle_fe_main.cc spindle_fe_serial.cc \ parse_launcher.cc parse_launcher_args.cc launcher.cc \ spindle_session.cc launch_slurm.cc launch_lsf.cc spindle_fe.cc \ @@ -193,29 +151,34 @@ am__spindle_SOURCES_DIST = spindle_fe_main.cc spindle_fe_serial.cc \ $(top_srcdir)/../utils/pathfn.c \ $(top_srcdir)/../utils/keyfile.c \ $(top_srcdir)/../utils/parseloc.c \ - $(top_srcdir)/../utils/rshlaunch.c launch_flux.cc -am__objects_4 = spindle-spindle_fe.$(OBJEXT) \ + $(top_srcdir)/../utils/rshlaunch.c \ + $(top_srcdir)/../utils/spindle_mkdir.c \ + $(top_srcdir)/../server/auditserver/cleanup_proc.cc \ + launch_flux.cc +am__objects_2 = spindle-spindle_fe.$(OBJEXT) \ spindle-parseargs.$(OBJEXT) spindle-config_parser.$(OBJEXT) \ spindle-config_mgr.$(OBJEXT) spindle-parse_preload.$(OBJEXT) \ $(top_builddir)/../utils/spindle-pathfn.$(OBJEXT) \ $(top_builddir)/../utils/spindle-keyfile.$(OBJEXT) \ $(top_builddir)/../utils/spindle-parseloc.$(OBJEXT) \ - $(top_builddir)/../utils/spindle-rshlaunch.$(OBJEXT) -@BLD_FLUXPLUGIN_TRUE@am__objects_5 = spindle-launch_flux.$(OBJEXT) + $(top_builddir)/../utils/spindle-rshlaunch.$(OBJEXT) \ + $(top_builddir)/../utils/spindle-spindle_mkdir.$(OBJEXT) \ + $(top_builddir)/../server/auditserver/spindle-cleanup_proc.$(OBJEXT) +@BLD_FLUXPLUGIN_TRUE@am__objects_3 = spindle-launch_flux.$(OBJEXT) am_spindle_OBJECTS = spindle-spindle_fe_main.$(OBJEXT) \ spindle-spindle_fe_serial.$(OBJEXT) \ spindle-parse_launcher.$(OBJEXT) \ spindle-parse_launcher_args.$(OBJEXT) \ spindle-launcher.$(OBJEXT) spindle-spindle_session.$(OBJEXT) \ spindle-launch_slurm.$(OBJEXT) spindle-launch_lsf.$(OBJEXT) \ - $(am__objects_4) $(am__objects_5) + $(am__objects_2) $(am__objects_3) spindle_OBJECTS = $(am_spindle_OBJECTS) -@BLD_FLUXPLUGIN_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) \ +@BLD_FLUXPLUGIN_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) \ @BLD_FLUXPLUGIN_TRUE@ $(am__DEPENDENCIES_1) \ @BLD_FLUXPLUGIN_TRUE@ $(top_builddir)/flux/libfluxsessionfe.la spindle_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(top_builddir)/openmpi_intercept/libparseompi.la \ - $(top_builddir)/hostbin/libhostbin.la $(am__DEPENDENCIES_4) \ + $(top_builddir)/hostbin/libhostbin.la $(am__DEPENDENCIES_3) \ $(am__append_6) spindle_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ @@ -235,23 +198,18 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/../../scripts/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-keyfile.Plo \ - $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-parseloc.Plo \ - $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-pathfn.Plo \ - $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-rshlaunch.Plo \ +am__depfiles_remade = $(top_builddir)/../server/auditserver/$(DEPDIR)/libspindlefe_static_la-cleanup_proc.Plo \ + $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Po \ $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-keyfile.Plo \ $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-parseloc.Plo \ $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-pathfn.Plo \ $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-rshlaunch.Plo \ + $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-spindle_mkdir.Plo \ $(top_builddir)/../utils/$(DEPDIR)/spindle-keyfile.Po \ $(top_builddir)/../utils/$(DEPDIR)/spindle-parseloc.Po \ $(top_builddir)/../utils/$(DEPDIR)/spindle-pathfn.Po \ $(top_builddir)/../utils/$(DEPDIR)/spindle-rshlaunch.Po \ - ./$(DEPDIR)/libspindlefe_la-config_mgr.Plo \ - ./$(DEPDIR)/libspindlefe_la-config_parser.Plo \ - ./$(DEPDIR)/libspindlefe_la-parse_preload.Plo \ - ./$(DEPDIR)/libspindlefe_la-parseargs.Plo \ - ./$(DEPDIR)/libspindlefe_la-spindle_fe.Plo \ + $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Po \ ./$(DEPDIR)/libspindlefe_static_la-config_mgr.Plo \ ./$(DEPDIR)/libspindlefe_static_la-config_parser.Plo \ ./$(DEPDIR)/libspindlefe_static_la-parse_preload.Plo \ @@ -308,15 +266,41 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -SOURCES = $(libspindlefe_la_SOURCES) $(libspindlefe_static_la_SOURCES) \ - $(spindle_SOURCES) -DIST_SOURCES = $(libspindlefe_la_SOURCES) \ - $(libspindlefe_static_la_SOURCES) $(am__spindle_SOURCES_DIST) +SOURCES = $(libspindlefe_static_la_SOURCES) $(spindle_SOURCES) +DIST_SOURCES = $(libspindlefe_static_la_SOURCES) \ + $(am__spindle_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } HEADERS = $(include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, @@ -489,22 +473,17 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libspindlefe.la noinst_LTLIBRARIES = libspindlefe_static.la include_HEADERS = $(top_srcdir)/../include/spindle_launch.h AM_CPPFLAGS = -I$(top_srcdir)/../logging -CORE_SOURCES = spindle_fe.cc parseargs.cc config_parser.cc config_mgr.cc parse_preload.cc $(top_srcdir)/../utils/pathfn.c $(top_srcdir)/../utils/keyfile.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/rshlaunch.c -CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../include -I$(top_srcdir)/comlib -I$(top_srcdir)/../server/cache -I$(top_srcdir)/../server/comlib -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DBINDIR=\"$(pkglibexecdir)\" -DLIBEXECDIR=\"$(pkglibexecdir)\" -DPROGLIBDIR=\"$(pkglibdir)\" -DPKGSYSCONFDIR=\"$(PKGSYSCONF_DIR)\" +CORE_SOURCES = spindle_fe.cc parseargs.cc config_parser.cc config_mgr.cc parse_preload.cc $(top_srcdir)/../utils/pathfn.c $(top_srcdir)/../utils/keyfile.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/rshlaunch.c $(top_srcdir)/../utils/spindle_mkdir.c $(top_srcdir)/../server/auditserver/cleanup_proc.cc +CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../include -I$(top_srcdir)/comlib -I$(top_srcdir)/../server/cache -I$(top_srcdir)/../server/comlib -I$(top_srcdir)/../server/auditserver -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DBINDIR=\"$(pkglibexecdir)\" -DLIBEXECDIR=\"$(pkglibexecdir)\" -DPROGLIBDIR=\"$(pkglibdir)\" -DPKGSYSCONFDIR=\"$(PKGSYSCONF_DIR)\" CORE_LDADD = $(top_builddir)/logging/libspindleflogc.la -lpthread \ $(am__append_1) $(am__append_2) $(MUNGE_DYN_LIB) \ $(GCRYPT_LIBS) -libspindlefe_la_CPPFLAGS = $(CORE_CPPFLAGS) -DSPINDLEFELIB -libspindlefe_la_SOURCES = $(CORE_SOURCES) -libspindlefe_la_LIBADD = $(CORE_LDADD) -libspindlefe_la_LDFLAGS = -version-info $(SPINDLEFE_LIB_VERSION) -libspindlefe_static_la_CPPFLAGS = $(libspindlefe_la_CPPFLAGS) -libspindlefe_static_la_SOURCES = $(libspindlefe_la_SOURCES) -libspindlefe_static_la_LIBADD = $(libspindlefe_la_LIBADD) +libspindlefe_static_la_CPPFLAGS = $(CORE_CPPFLAGS) -DSPINDLEFELIB +libspindlefe_static_la_SOURCES = $(CORE_SOURCES) +libspindlefe_static_la_LIBADD = $(CORE_LDADD) spindle_CPPFLAGS = $(CORE_CPPFLAGS) -DSPINDLEEXE $(am__append_4) spindle_SOURCES = spindle_fe_main.cc spindle_fe_serial.cc \ parse_launcher.cc parse_launcher_args.cc launcher.cc \ @@ -598,41 +577,6 @@ clean-binPROGRAMS: echo " rm -f" $$list; \ rm -f $$list -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ @@ -649,21 +593,6 @@ $(top_builddir)/../utils/$(am__dirstamp): $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) $(top_builddir)/../utils/$(DEPDIR) @: > $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) -$(top_builddir)/../utils/libspindlefe_la-pathfn.lo: \ - $(top_builddir)/../utils/$(am__dirstamp) \ - $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) -$(top_builddir)/../utils/libspindlefe_la-keyfile.lo: \ - $(top_builddir)/../utils/$(am__dirstamp) \ - $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) -$(top_builddir)/../utils/libspindlefe_la-parseloc.lo: \ - $(top_builddir)/../utils/$(am__dirstamp) \ - $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) -$(top_builddir)/../utils/libspindlefe_la-rshlaunch.lo: \ - $(top_builddir)/../utils/$(am__dirstamp) \ - $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) - -libspindlefe.la: $(libspindlefe_la_OBJECTS) $(libspindlefe_la_DEPENDENCIES) $(EXTRA_libspindlefe_la_DEPENDENCIES) - $(AM_V_CXXLD)$(libspindlefe_la_LINK) -rpath $(libdir) $(libspindlefe_la_OBJECTS) $(libspindlefe_la_LIBADD) $(LIBS) $(top_builddir)/../utils/libspindlefe_static_la-pathfn.lo: \ $(top_builddir)/../utils/$(am__dirstamp) \ $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) @@ -676,6 +605,18 @@ $(top_builddir)/../utils/libspindlefe_static_la-parseloc.lo: \ $(top_builddir)/../utils/libspindlefe_static_la-rshlaunch.lo: \ $(top_builddir)/../utils/$(am__dirstamp) \ $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) +$(top_builddir)/../utils/libspindlefe_static_la-spindle_mkdir.lo: \ + $(top_builddir)/../utils/$(am__dirstamp) \ + $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) +$(top_builddir)/../server/auditserver/$(am__dirstamp): + @$(MKDIR_P) $(top_builddir)/../server/auditserver + @: > $(top_builddir)/../server/auditserver/$(am__dirstamp) +$(top_builddir)/../server/auditserver/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) $(top_builddir)/../server/auditserver/$(DEPDIR) + @: > $(top_builddir)/../server/auditserver/$(DEPDIR)/$(am__dirstamp) +$(top_builddir)/../server/auditserver/libspindlefe_static_la-cleanup_proc.lo: \ + $(top_builddir)/../server/auditserver/$(am__dirstamp) \ + $(top_builddir)/../server/auditserver/$(DEPDIR)/$(am__dirstamp) libspindlefe_static.la: $(libspindlefe_static_la_OBJECTS) $(libspindlefe_static_la_DEPENDENCIES) $(EXTRA_libspindlefe_static_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libspindlefe_static_la_OBJECTS) $(libspindlefe_static_la_LIBADD) $(LIBS) @@ -691,6 +632,12 @@ $(top_builddir)/../utils/spindle-parseloc.$(OBJEXT): \ $(top_builddir)/../utils/spindle-rshlaunch.$(OBJEXT): \ $(top_builddir)/../utils/$(am__dirstamp) \ $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) +$(top_builddir)/../utils/spindle-spindle_mkdir.$(OBJEXT): \ + $(top_builddir)/../utils/$(am__dirstamp) \ + $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) +$(top_builddir)/../server/auditserver/spindle-cleanup_proc.$(OBJEXT): \ + $(top_builddir)/../server/auditserver/$(am__dirstamp) \ + $(top_builddir)/../server/auditserver/$(DEPDIR)/$(am__dirstamp) spindle$(EXEEXT): $(spindle_OBJECTS) $(spindle_DEPENDENCIES) $(EXTRA_spindle_DEPENDENCIES) @rm -f spindle$(EXEEXT) @@ -698,29 +645,26 @@ spindle$(EXEEXT): $(spindle_OBJECTS) $(spindle_DEPENDENCIES) $(EXTRA_spindle_DEP mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f $(top_builddir)/../server/auditserver/*.$(OBJEXT) + -rm -f $(top_builddir)/../server/auditserver/*.lo -rm -f $(top_builddir)/../utils/*.$(OBJEXT) -rm -f $(top_builddir)/../utils/*.lo distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-keyfile.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-parseloc.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-pathfn.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-rshlaunch.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../server/auditserver/$(DEPDIR)/libspindlefe_static_la-cleanup_proc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-keyfile.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-parseloc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-pathfn.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-rshlaunch.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-spindle_mkdir.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/spindle-keyfile.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/spindle-parseloc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/spindle-pathfn.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/spindle-rshlaunch.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_la-config_mgr.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_la-config_parser.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_la-parse_preload.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_la-parseargs.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_la-spindle_fe.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_static_la-config_mgr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_static_la-config_parser.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspindlefe_static_la-parse_preload.Plo@am__quote@ # am--include-marker @@ -771,34 +715,6 @@ am--depfiles: $(am__depfiles_remade) @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -$(top_builddir)/../utils/libspindlefe_la-pathfn.lo: $(top_builddir)/../utils/pathfn.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/libspindlefe_la-pathfn.lo -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-pathfn.Tpo -c -o $(top_builddir)/../utils/libspindlefe_la-pathfn.lo `test -f '$(top_builddir)/../utils/pathfn.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/pathfn.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-pathfn.Tpo $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-pathfn.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/../utils/pathfn.c' object='$(top_builddir)/../utils/libspindlefe_la-pathfn.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/libspindlefe_la-pathfn.lo `test -f '$(top_builddir)/../utils/pathfn.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/pathfn.c - -$(top_builddir)/../utils/libspindlefe_la-keyfile.lo: $(top_builddir)/../utils/keyfile.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/libspindlefe_la-keyfile.lo -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-keyfile.Tpo -c -o $(top_builddir)/../utils/libspindlefe_la-keyfile.lo `test -f '$(top_builddir)/../utils/keyfile.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/keyfile.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-keyfile.Tpo $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-keyfile.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/../utils/keyfile.c' object='$(top_builddir)/../utils/libspindlefe_la-keyfile.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/libspindlefe_la-keyfile.lo `test -f '$(top_builddir)/../utils/keyfile.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/keyfile.c - -$(top_builddir)/../utils/libspindlefe_la-parseloc.lo: $(top_builddir)/../utils/parseloc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/libspindlefe_la-parseloc.lo -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-parseloc.Tpo -c -o $(top_builddir)/../utils/libspindlefe_la-parseloc.lo `test -f '$(top_builddir)/../utils/parseloc.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/parseloc.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-parseloc.Tpo $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-parseloc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/../utils/parseloc.c' object='$(top_builddir)/../utils/libspindlefe_la-parseloc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/libspindlefe_la-parseloc.lo `test -f '$(top_builddir)/../utils/parseloc.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/parseloc.c - -$(top_builddir)/../utils/libspindlefe_la-rshlaunch.lo: $(top_builddir)/../utils/rshlaunch.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/libspindlefe_la-rshlaunch.lo -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-rshlaunch.Tpo -c -o $(top_builddir)/../utils/libspindlefe_la-rshlaunch.lo `test -f '$(top_builddir)/../utils/rshlaunch.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/rshlaunch.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-rshlaunch.Tpo $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-rshlaunch.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/../utils/rshlaunch.c' object='$(top_builddir)/../utils/libspindlefe_la-rshlaunch.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/libspindlefe_la-rshlaunch.lo `test -f '$(top_builddir)/../utils/rshlaunch.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/rshlaunch.c - $(top_builddir)/../utils/libspindlefe_static_la-pathfn.lo: $(top_builddir)/../utils/pathfn.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/libspindlefe_static_la-pathfn.lo -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-pathfn.Tpo -c -o $(top_builddir)/../utils/libspindlefe_static_la-pathfn.lo `test -f '$(top_builddir)/../utils/pathfn.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/pathfn.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-pathfn.Tpo $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-pathfn.Plo @@ -827,6 +743,13 @@ $(top_builddir)/../utils/libspindlefe_static_la-rshlaunch.lo: $(top_builddir)/.. @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/libspindlefe_static_la-rshlaunch.lo `test -f '$(top_builddir)/../utils/rshlaunch.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/rshlaunch.c +$(top_builddir)/../utils/libspindlefe_static_la-spindle_mkdir.lo: $(top_builddir)/../utils/spindle_mkdir.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/libspindlefe_static_la-spindle_mkdir.lo -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-spindle_mkdir.Tpo -c -o $(top_builddir)/../utils/libspindlefe_static_la-spindle_mkdir.lo `test -f '$(top_builddir)/../utils/spindle_mkdir.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/spindle_mkdir.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-spindle_mkdir.Tpo $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-spindle_mkdir.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/../utils/spindle_mkdir.c' object='$(top_builddir)/../utils/libspindlefe_static_la-spindle_mkdir.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/libspindlefe_static_la-spindle_mkdir.lo `test -f '$(top_builddir)/../utils/spindle_mkdir.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/spindle_mkdir.c + $(top_builddir)/../utils/spindle-pathfn.o: $(top_builddir)/../utils/pathfn.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/spindle-pathfn.o -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/spindle-pathfn.Tpo -c -o $(top_builddir)/../utils/spindle-pathfn.o `test -f '$(top_builddir)/../utils/pathfn.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/pathfn.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/spindle-pathfn.Tpo $(top_builddir)/../utils/$(DEPDIR)/spindle-pathfn.Po @@ -883,6 +806,20 @@ $(top_builddir)/../utils/spindle-rshlaunch.obj: $(top_builddir)/../utils/rshlaun @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/spindle-rshlaunch.obj `if test -f '$(top_builddir)/../utils/rshlaunch.c'; then $(CYGPATH_W) '$(top_builddir)/../utils/rshlaunch.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/../utils/rshlaunch.c'; fi` +$(top_builddir)/../utils/spindle-spindle_mkdir.o: $(top_builddir)/../utils/spindle_mkdir.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/spindle-spindle_mkdir.o -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Tpo -c -o $(top_builddir)/../utils/spindle-spindle_mkdir.o `test -f '$(top_builddir)/../utils/spindle_mkdir.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/spindle_mkdir.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Tpo $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/../utils/spindle_mkdir.c' object='$(top_builddir)/../utils/spindle-spindle_mkdir.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/spindle-spindle_mkdir.o `test -f '$(top_builddir)/../utils/spindle_mkdir.c' || echo '$(srcdir)/'`$(top_builddir)/../utils/spindle_mkdir.c + +$(top_builddir)/../utils/spindle-spindle_mkdir.obj: $(top_builddir)/../utils/spindle_mkdir.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT $(top_builddir)/../utils/spindle-spindle_mkdir.obj -MD -MP -MF $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Tpo -c -o $(top_builddir)/../utils/spindle-spindle_mkdir.obj `if test -f '$(top_builddir)/../utils/spindle_mkdir.c'; then $(CYGPATH_W) '$(top_builddir)/../utils/spindle_mkdir.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/../utils/spindle_mkdir.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Tpo $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/../utils/spindle_mkdir.c' object='$(top_builddir)/../utils/spindle-spindle_mkdir.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/../utils/spindle-spindle_mkdir.obj `if test -f '$(top_builddir)/../utils/spindle_mkdir.c'; then $(CYGPATH_W) '$(top_builddir)/../utils/spindle_mkdir.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/../utils/spindle_mkdir.c'; fi` + .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @@ -907,41 +844,6 @@ $(top_builddir)/../utils/spindle-rshlaunch.obj: $(top_builddir)/../utils/rshlaun @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< -libspindlefe_la-spindle_fe.lo: spindle_fe.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libspindlefe_la-spindle_fe.lo -MD -MP -MF $(DEPDIR)/libspindlefe_la-spindle_fe.Tpo -c -o libspindlefe_la-spindle_fe.lo `test -f 'spindle_fe.cc' || echo '$(srcdir)/'`spindle_fe.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspindlefe_la-spindle_fe.Tpo $(DEPDIR)/libspindlefe_la-spindle_fe.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='spindle_fe.cc' object='libspindlefe_la-spindle_fe.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libspindlefe_la-spindle_fe.lo `test -f 'spindle_fe.cc' || echo '$(srcdir)/'`spindle_fe.cc - -libspindlefe_la-parseargs.lo: parseargs.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libspindlefe_la-parseargs.lo -MD -MP -MF $(DEPDIR)/libspindlefe_la-parseargs.Tpo -c -o libspindlefe_la-parseargs.lo `test -f 'parseargs.cc' || echo '$(srcdir)/'`parseargs.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspindlefe_la-parseargs.Tpo $(DEPDIR)/libspindlefe_la-parseargs.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parseargs.cc' object='libspindlefe_la-parseargs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libspindlefe_la-parseargs.lo `test -f 'parseargs.cc' || echo '$(srcdir)/'`parseargs.cc - -libspindlefe_la-config_parser.lo: config_parser.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libspindlefe_la-config_parser.lo -MD -MP -MF $(DEPDIR)/libspindlefe_la-config_parser.Tpo -c -o libspindlefe_la-config_parser.lo `test -f 'config_parser.cc' || echo '$(srcdir)/'`config_parser.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspindlefe_la-config_parser.Tpo $(DEPDIR)/libspindlefe_la-config_parser.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='config_parser.cc' object='libspindlefe_la-config_parser.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libspindlefe_la-config_parser.lo `test -f 'config_parser.cc' || echo '$(srcdir)/'`config_parser.cc - -libspindlefe_la-config_mgr.lo: config_mgr.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libspindlefe_la-config_mgr.lo -MD -MP -MF $(DEPDIR)/libspindlefe_la-config_mgr.Tpo -c -o libspindlefe_la-config_mgr.lo `test -f 'config_mgr.cc' || echo '$(srcdir)/'`config_mgr.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspindlefe_la-config_mgr.Tpo $(DEPDIR)/libspindlefe_la-config_mgr.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='config_mgr.cc' object='libspindlefe_la-config_mgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libspindlefe_la-config_mgr.lo `test -f 'config_mgr.cc' || echo '$(srcdir)/'`config_mgr.cc - -libspindlefe_la-parse_preload.lo: parse_preload.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libspindlefe_la-parse_preload.lo -MD -MP -MF $(DEPDIR)/libspindlefe_la-parse_preload.Tpo -c -o libspindlefe_la-parse_preload.lo `test -f 'parse_preload.cc' || echo '$(srcdir)/'`parse_preload.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspindlefe_la-parse_preload.Tpo $(DEPDIR)/libspindlefe_la-parse_preload.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_preload.cc' object='libspindlefe_la-parse_preload.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libspindlefe_la-parse_preload.lo `test -f 'parse_preload.cc' || echo '$(srcdir)/'`parse_preload.cc - libspindlefe_static_la-spindle_fe.lo: spindle_fe.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libspindlefe_static_la-spindle_fe.lo -MD -MP -MF $(DEPDIR)/libspindlefe_static_la-spindle_fe.Tpo -c -o libspindlefe_static_la-spindle_fe.lo `test -f 'spindle_fe.cc' || echo '$(srcdir)/'`spindle_fe.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspindlefe_static_la-spindle_fe.Tpo $(DEPDIR)/libspindlefe_static_la-spindle_fe.Plo @@ -977,6 +879,13 @@ libspindlefe_static_la-parse_preload.lo: parse_preload.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libspindlefe_static_la-parse_preload.lo `test -f 'parse_preload.cc' || echo '$(srcdir)/'`parse_preload.cc +$(top_builddir)/../server/auditserver/libspindlefe_static_la-cleanup_proc.lo: $(top_builddir)/../server/auditserver/cleanup_proc.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(top_builddir)/../server/auditserver/libspindlefe_static_la-cleanup_proc.lo -MD -MP -MF $(top_builddir)/../server/auditserver/$(DEPDIR)/libspindlefe_static_la-cleanup_proc.Tpo -c -o $(top_builddir)/../server/auditserver/libspindlefe_static_la-cleanup_proc.lo `test -f '$(top_builddir)/../server/auditserver/cleanup_proc.cc' || echo '$(srcdir)/'`$(top_builddir)/../server/auditserver/cleanup_proc.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../server/auditserver/$(DEPDIR)/libspindlefe_static_la-cleanup_proc.Tpo $(top_builddir)/../server/auditserver/$(DEPDIR)/libspindlefe_static_la-cleanup_proc.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_builddir)/../server/auditserver/cleanup_proc.cc' object='$(top_builddir)/../server/auditserver/libspindlefe_static_la-cleanup_proc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspindlefe_static_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(top_builddir)/../server/auditserver/libspindlefe_static_la-cleanup_proc.lo `test -f '$(top_builddir)/../server/auditserver/cleanup_proc.cc' || echo '$(srcdir)/'`$(top_builddir)/../server/auditserver/cleanup_proc.cc + spindle-spindle_fe_main.o: spindle_fe_main.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT spindle-spindle_fe_main.o -MD -MP -MF $(DEPDIR)/spindle-spindle_fe_main.Tpo -c -o spindle-spindle_fe_main.o `test -f 'spindle_fe_main.cc' || echo '$(srcdir)/'`spindle_fe_main.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spindle-spindle_fe_main.Tpo $(DEPDIR)/spindle-spindle_fe_main.Po @@ -1159,6 +1068,20 @@ spindle-parse_preload.obj: parse_preload.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o spindle-parse_preload.obj `if test -f 'parse_preload.cc'; then $(CYGPATH_W) 'parse_preload.cc'; else $(CYGPATH_W) '$(srcdir)/parse_preload.cc'; fi` +$(top_builddir)/../server/auditserver/spindle-cleanup_proc.o: $(top_builddir)/../server/auditserver/cleanup_proc.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(top_builddir)/../server/auditserver/spindle-cleanup_proc.o -MD -MP -MF $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Tpo -c -o $(top_builddir)/../server/auditserver/spindle-cleanup_proc.o `test -f '$(top_builddir)/../server/auditserver/cleanup_proc.cc' || echo '$(srcdir)/'`$(top_builddir)/../server/auditserver/cleanup_proc.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Tpo $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_builddir)/../server/auditserver/cleanup_proc.cc' object='$(top_builddir)/../server/auditserver/spindle-cleanup_proc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(top_builddir)/../server/auditserver/spindle-cleanup_proc.o `test -f '$(top_builddir)/../server/auditserver/cleanup_proc.cc' || echo '$(srcdir)/'`$(top_builddir)/../server/auditserver/cleanup_proc.cc + +$(top_builddir)/../server/auditserver/spindle-cleanup_proc.obj: $(top_builddir)/../server/auditserver/cleanup_proc.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(top_builddir)/../server/auditserver/spindle-cleanup_proc.obj -MD -MP -MF $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Tpo -c -o $(top_builddir)/../server/auditserver/spindle-cleanup_proc.obj `if test -f '$(top_builddir)/../server/auditserver/cleanup_proc.cc'; then $(CYGPATH_W) '$(top_builddir)/../server/auditserver/cleanup_proc.cc'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/../server/auditserver/cleanup_proc.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Tpo $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_builddir)/../server/auditserver/cleanup_proc.cc' object='$(top_builddir)/../server/auditserver/spindle-cleanup_proc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(top_builddir)/../server/auditserver/spindle-cleanup_proc.obj `if test -f '$(top_builddir)/../server/auditserver/cleanup_proc.cc'; then $(CYGPATH_W) '$(top_builddir)/../server/auditserver/cleanup_proc.cc'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/../server/auditserver/cleanup_proc.cc'; fi` + spindle-launch_flux.o: launch_flux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spindle_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT spindle-launch_flux.o -MD -MP -MF $(DEPDIR)/spindle-launch_flux.Tpo -c -o spindle-launch_flux.o `test -f 'launch_flux.cc' || echo '$(srcdir)/'`launch_flux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spindle-launch_flux.Tpo $(DEPDIR)/spindle-launch_flux.Po @@ -1177,6 +1100,7 @@ mostlyclean-libtool: -rm -f *.lo clean-libtool: + -rm -rf $(top_builddir)/../server/auditserver/.libs $(top_builddir)/../server/auditserver/_libs -rm -rf $(top_builddir)/../utils/.libs $(top_builddir)/../utils/_libs -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @@ -1289,10 +1213,8 @@ distdir-am: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS) -install-binPROGRAMS: install-libLTLIBRARIES - installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1321,6 +1243,8 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(top_builddir)/../server/auditserver/$(DEPDIR)/$(am__dirstamp)" || rm -f $(top_builddir)/../server/auditserver/$(DEPDIR)/$(am__dirstamp) + -test -z "$(top_builddir)/../server/auditserver/$(am__dirstamp)" || rm -f $(top_builddir)/../server/auditserver/$(am__dirstamp) -test -z "$(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp)" || rm -f $(top_builddir)/../utils/$(DEPDIR)/$(am__dirstamp) -test -z "$(top_builddir)/../utils/$(am__dirstamp)" || rm -f $(top_builddir)/../utils/$(am__dirstamp) @@ -1329,27 +1253,22 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstLTLIBRARIES mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-keyfile.Plo - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-parseloc.Plo - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-pathfn.Plo - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-rshlaunch.Plo + -rm -f $(top_builddir)/../server/auditserver/$(DEPDIR)/libspindlefe_static_la-cleanup_proc.Plo + -rm -f $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-keyfile.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-parseloc.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-pathfn.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-rshlaunch.Plo + -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-spindle_mkdir.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-keyfile.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-parseloc.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-pathfn.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-rshlaunch.Po - -rm -f ./$(DEPDIR)/libspindlefe_la-config_mgr.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-config_parser.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-parse_preload.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-parseargs.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-spindle_fe.Plo + -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Po -rm -f ./$(DEPDIR)/libspindlefe_static_la-config_mgr.Plo -rm -f ./$(DEPDIR)/libspindlefe_static_la-config_parser.Plo -rm -f ./$(DEPDIR)/libspindlefe_static_la-parse_preload.Plo @@ -1391,7 +1310,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES +install-exec-am: install-binPROGRAMS install-html: install-html-am @@ -1414,23 +1333,18 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-keyfile.Plo - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-parseloc.Plo - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-pathfn.Plo - -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_la-rshlaunch.Plo + -rm -f $(top_builddir)/../server/auditserver/$(DEPDIR)/libspindlefe_static_la-cleanup_proc.Plo + -rm -f $(top_builddir)/../server/auditserver/$(DEPDIR)/spindle-cleanup_proc.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-keyfile.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-parseloc.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-pathfn.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-rshlaunch.Plo + -rm -f $(top_builddir)/../utils/$(DEPDIR)/libspindlefe_static_la-spindle_mkdir.Plo -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-keyfile.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-parseloc.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-pathfn.Po -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-rshlaunch.Po - -rm -f ./$(DEPDIR)/libspindlefe_la-config_mgr.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-config_parser.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-parse_preload.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-parseargs.Plo - -rm -f ./$(DEPDIR)/libspindlefe_la-spindle_fe.Plo + -rm -f $(top_builddir)/../utils/$(DEPDIR)/spindle-spindle_mkdir.Po -rm -f ./$(DEPDIR)/libspindlefe_static_la-config_mgr.Plo -rm -f ./$(DEPDIR)/libspindlefe_static_la-config_parser.Plo -rm -f ./$(DEPDIR)/libspindlefe_static_la-parse_preload.Plo @@ -1466,27 +1380,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES +uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ + clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-includeHEADERS .PRECIOUS: Makefile diff --git a/src/fe/startup/config_mgr.cc b/src/fe/startup/config_mgr.cc index 1d6e1889..7cbc6e18 100644 --- a/src/fe/startup/config_mgr.cc +++ b/src/fe/startup/config_mgr.cc @@ -66,6 +66,18 @@ using namespace std; #define SPINDLE_CACHEPATHS_STR "$TMPDIR" #endif +#if defined(SESSIONPATHS) +#define SPINDLE_SESSIONPATHS_STR SESSIONPATHS +#elif defined(SESSIONPATH) +#define SPINDLE_SESSIONPATHS_STR SESSIONPATH +#elif defined(COMMPATHS) +#define SPINDLE_SESSIONPATHS_STR COMMPATHS +#elif defined(COMMPATH) +#define SPINDLE_SESSIONPATHS_STR COMMPATH +#else +#define SPINDLE_SESSIONPATHS_STR "$TMPDIR" +#endif + #if defined(SPINDLE_LOCAL_PREFIX) #define SPINDLE_LOCAL_PREFIX_STR SPINDLE_LOCAL_PREFIX #else @@ -291,6 +303,10 @@ void initOptionsList() "Colon-separated list of candidate paths for cached libraries."}, { confCachePaths, "cachepath", shortNone, groupMisc, cvString, {}, SPINDLE_CACHEPATHS_STR, "Synonym for --cachepaths." }, + { confSessionPaths, "sessionpaths", shortSessionPaths, groupMisc, cvString, {}, SPINDLE_SESSIONPATHS_STR, + "Colon-separated list of candidate paths for session management. Sessions span multiple jobs. Defaults to --commpaths if not specified." }, + { confSessionPaths, "sessionpath", shortNone, groupMisc, cvString, {}, SPINDLE_SESSIONPATHS_STR, + "Synonym for --sessionpaths." }, { confNoclean, "noclean", shortNoClean, groupMisc, cvBool, {}, "false", "Don't remove local file cache after execution." }, { confDisableLogging, "disable-logging", shortDisableLogging, groupMisc, cvBool, {}, DISABLE_LOGGING_STR, @@ -780,6 +796,10 @@ bool ConfigMap::toSpindleArgs(spindle_args_t &args, bool alloc_strs) const } break; } + case confSessionPaths: + // Session paths don't use $NUMBER since sessions span multiple jobs + args.sessionpaths = getstr(strresult, alloc_strs); + break; case confCachePrefix: __attribute__((fallthrough)); // gcc-specific case confPythonPrefix: diff --git a/src/fe/startup/config_mgr.h b/src/fe/startup/config_mgr.h index ffebefc0..aac94870 100644 --- a/src/fe/startup/config_mgr.h +++ b/src/fe/startup/config_mgr.h @@ -31,6 +31,7 @@ enum SpindleConfigID { confNumPorts, confCommPaths, confCachePaths, + confSessionPaths, confCachePrefix, confPythonPrefix, confLocalPrefix, @@ -130,6 +131,7 @@ enum CmdlineShortOptions { shortPatchLdso = 299, shortCachePaths = 300, shortCrashDedup = 301, + shortSessionPaths = 302, }; enum CmdlineGroups { diff --git a/src/fe/startup/spindle_session.cc b/src/fe/startup/spindle_session.cc index 4b61ab55..9dcefe11 100644 --- a/src/fe/startup/spindle_session.cc +++ b/src/fe/startup/spindle_session.cc @@ -39,6 +39,11 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "spindle_session.h" #include "spindle_debug.h" +#include "ldcs_api.h" + +extern "C" { +#include "parseloc.h" +} using namespace std; @@ -63,30 +68,53 @@ static void waitfor_init_done(); extern bool getRandom(void *bytes, size_t bytes_size); -static string getTmpdir() +// Compute session directory from sessionpaths (with fallback to commpaths) +// Returns the first valid path, or empty string on failure +static string getSessionDir(spindle_args_t *args) { - string dirname; - if (getenv("TMPDIR")) { - return getenv("TMPDIR"); - } -#if defined(P_tmpdir) - else if (P_tmpdir) { - return P_tmpdir; + char *sessionpaths = args->sessionpaths; + char *commpaths = args->commpaths; + char *first_valid = NULL; + + // Try sessionpaths first + if (sessionpaths && sessionpaths[0] != '\0') { + debug_printf2("Evaluating sessionpaths: %s\n", sessionpaths); + if (getFirstValidPath(sessionpaths, &first_valid, 0) == 0 && first_valid) { + string result(first_valid); + free(first_valid); + return result; + } + // sessionpaths specified but none valid + debug_printf2("No valid sessionpaths found, trying commpaths fallback\n"); } -#endif - else { - return "/tmp"; + + // Fallback to commpaths + if (commpaths && commpaths[0] != '\0') { + debug_printf2("Evaluating commpaths for session: %s\n", commpaths); + if (getFirstValidPath(commpaths, &first_valid, 0) == 0 && first_valid) { + string result(first_valid); + free(first_valid); + return result; + } } + + err_printf("No valid sessionpaths or commpaths found\n"); + return string(); // Empty string indicates failure } #define SESSION_ID_CHARS 8 -static void create_session_id() +static void create_session_id(string session_dir) { unsigned char randombytes[SESSION_ID_CHARS]; char session_id_str[SESSION_ID_CHARS+1]; - string dirname = getTmpdir(); - - for (int j = 0; j < 5; j++) { //Try to generate a random name five times. + + if (session_dir.empty()) { + err_printf("Cannot create session ID: no valid session directory\n"); + fprintf(stderr, "Spindle error: no valid session directory found\n"); + exit(-1); + } + + for (int j = 0; j < 5; j++) { //Try to generate a random name five times. bool result = getRandom(randombytes, sizeof(randombytes)); if (!result) { err_printf("Failed to read random bytes\n"); @@ -95,7 +123,7 @@ static void create_session_id() } for (unsigned long i = 0; i < sizeof(randombytes); i++) { unsigned int val = (unsigned int) (randombytes[i] & 63); //6 bits - if (val < 26) + if (val < 26) session_id_str[i] = 'a' + val; else if (val < 52) session_id_str[i] = 'A' + (val - 26); @@ -109,8 +137,8 @@ static void create_session_id() assert(0); } session_id_str[sizeof(session_id_str)-1] = '\0'; - - string fullpath = dirname + "/" + SOCKET_PREFIX + session_id_str; + + string fullpath = session_dir + "/" + SOCKET_PREFIX + session_id_str; struct stat buf; if (stat(fullpath.c_str(), &buf) != -1) { @@ -127,11 +155,37 @@ static void create_session_id() exit(-1); } -static void set_session_id(std::string id) +// Parse session ID which may be in one of two formats: +// - New format: "AbC123Xy:/path/to/session/dir" (ID:path) +// - Old format: "AbC123Xy" (just ID, reconstruct path from $TMPDIR) +static void set_session_id(std::string combined, spindle_args_t *args) { - string dirname = getTmpdir(); - session_socket = dirname + "/" + SOCKET_PREFIX + id; - session_id = id; + size_t colon = combined.find(':'); + if (colon != string::npos) { + // New format: ID:path + session_id = combined.substr(0, colon); + string session_dir = combined.substr(colon + 1); + session_socket = session_dir + "/" + SOCKET_PREFIX + session_id; + debug_printf2("Parsed session ID (new format): id=%s, dir=%s\n", + session_id.c_str(), session_dir.c_str()); + } else { + // Old format: just ID, reconstruct path + session_id = combined; + string session_dir = getSessionDir(args); + if (session_dir.empty()) { + // Fallback to $TMPDIR for backward compatibility + if (getenv("TMPDIR")) { + session_dir = getenv("TMPDIR"); + } else { + session_dir = "/tmp"; + } + debug_printf2("Using fallback session dir for old-format ID: %s\n", + session_dir.c_str()); + } + session_socket = session_dir + "/" + SOCKET_PREFIX + session_id; + debug_printf2("Parsed session ID (old format): id=%s, dir=%s\n", + session_id.c_str(), session_dir.c_str()); + } } static int create_unixsocket() @@ -447,13 +501,26 @@ int init_session(spindle_args_t *args, const ConfigMap &config, Launcher *launch debug_printf("Starting new spindle session\n"); bool multi_start = (config.isSet(confStartMultiSession)); - create_session_id(); + // Get session directory from sessionpaths (with commpaths fallback) + string session_dir = getSessionDir(args); + if (session_dir.empty()) { + fprintf(stderr, "Error: No valid session directory found\n"); + return -1; + } + + create_session_id(session_dir); debug_printf("New session code is %s\n", session_id.c_str()); debug_printf("New session socket is %s\n", session_socket.c_str()); - args->session_key = strdup(session_id.c_str()); - //Print new session id + + // Encode path in session ID for subsequent jobs: "ID:path" + char combined_id[MAX_PATH_LEN]; + snprintf(combined_id, sizeof(combined_id), "%s:%s", + session_id.c_str(), session_dir.c_str()); + args->session_key = strdup(combined_id); + + //Print new session id with encoded path if (multi_start || args->use_launcher == srun_launcher) { - (void)! write(1, session_id.c_str(), session_id.length()); + (void)! write(1, combined_id, strlen(combined_id)); (void)! write(1, "\n", 1); } @@ -500,8 +567,8 @@ int init_session(spindle_args_t *args, const ConfigMap &config, Launcher *launch exit(-1); } } - - set_session_id(id); + + set_session_id(id, args); debug_printf("Connecting to existing spindle session-id %s\n", session_id.c_str()); result = connect_to_session(); if (result == -1) { diff --git a/src/flux/Makefile.am b/src/flux/Makefile.am index 717c2104..304712ce 100644 --- a/src/flux/Makefile.am +++ b/src/flux/Makefile.am @@ -29,8 +29,8 @@ libspindleflux_la_LDFLAGS = \ -module spindle_flux_session_SOURCES = main.cc $(top_srcdir)/src/utils/spindle_mkdir.c $(top_srcdir)/src/utils/parseloc.c -spindle_flux_session_CPPFLAGS = -I$(top_srcdir)/src/flux -I$(top_srcdir)/src/logging -I$(top_srcdir)/src/include -spindle_flux_session_LDADD = libfluxsession.la +spindle_flux_session_CPPFLAGS = -I$(top_srcdir)/src/flux -I$(top_srcdir)/src/logging -I$(top_srcdir)/src/include -I$(top_srcdir)/src/fe/startup -I$(top_srcdir)/src/utils +spindle_flux_session_LDADD = libfluxsession.la $(top_builddir)/src/fe/startup/libspindlefe_static.la libfluxsession_la_SOURCES = sessionmgr.c fluxmgr.c procmgr.c spindlefemgr.c spindlebemgr.c libfluxsession_la_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/flux $(FLUX_CORE_CFLAGS) $(FLUX_HOSTLIST_CFLAGS) diff --git a/src/flux/Makefile.in b/src/flux/Makefile.in index e6733b24..52c0ef21 100644 --- a/src/flux/Makefile.in +++ b/src/flux/Makefile.in @@ -172,7 +172,8 @@ am_spindle_flux_session_OBJECTS = spindle_flux_session-main.$(OBJEXT) \ $(top_builddir)/src/utils/spindle_flux_session-spindle_mkdir.$(OBJEXT) \ $(top_builddir)/src/utils/spindle_flux_session-parseloc.$(OBJEXT) spindle_flux_session_OBJECTS = $(am_spindle_flux_session_OBJECTS) -spindle_flux_session_DEPENDENCIES = libfluxsession.la +spindle_flux_session_DEPENDENCIES = libfluxsession.la \ + $(top_builddir)/src/fe/startup/libspindlefe_static.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -453,8 +454,8 @@ libspindleflux_la_LDFLAGS = \ -module spindle_flux_session_SOURCES = main.cc $(top_srcdir)/src/utils/spindle_mkdir.c $(top_srcdir)/src/utils/parseloc.c -spindle_flux_session_CPPFLAGS = -I$(top_srcdir)/src/flux -I$(top_srcdir)/src/logging -I$(top_srcdir)/src/include -spindle_flux_session_LDADD = libfluxsession.la +spindle_flux_session_CPPFLAGS = -I$(top_srcdir)/src/flux -I$(top_srcdir)/src/logging -I$(top_srcdir)/src/include -I$(top_srcdir)/src/fe/startup -I$(top_srcdir)/src/utils +spindle_flux_session_LDADD = libfluxsession.la $(top_builddir)/src/fe/startup/libspindlefe_static.la libfluxsession_la_SOURCES = sessionmgr.c fluxmgr.c procmgr.c spindlefemgr.c spindlebemgr.c libfluxsession_la_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/flux $(FLUX_CORE_CFLAGS) $(FLUX_HOSTLIST_CFLAGS) libfluxsession_la_LDFLAGS = $(fluxplugin_ldflags) -Wl,--allow-multiple-definition diff --git a/src/flux/main.cc b/src/flux/main.cc index bf4b3118..6f4a8cf9 100644 --- a/src/flux/main.cc +++ b/src/flux/main.cc @@ -18,14 +18,69 @@ Place, Suite 330, Boston, MA 02111-1307 USA //This file is c++ just to fool the automake linker to use c++ linkage extern "C" { -#include "sessionmgr.h" +#include "sessionmgr.h" +#include "ldcs_api.h" +#include "parseloc.h" } +#include "../fe/startup/config_mgr.h" #include #include +#include +#include + +// Compute session directory from config (sessionpaths with commpaths fallback) +static std::string computeSessionDir(ConfigMap &config) +{ + char *first_valid = NULL; + + // Try sessionpaths first + auto sessionpaths_pair = config.getValueString(confSessionPaths); + if (sessionpaths_pair.first && !sessionpaths_pair.second.empty()) { + char *sessionpaths = const_cast(sessionpaths_pair.second.c_str()); + fprintf(stderr, "Debug: Evaluating sessionpaths: %s\n", sessionpaths); + if (getFirstValidPath(sessionpaths, &first_valid, 0) == 0 && first_valid) { + std::string result(first_valid); + free(first_valid); + return result; + } + fprintf(stderr, "Debug: No valid sessionpaths found, trying commpaths fallback\n"); + } + + // Fallback to commpaths + auto commpaths_pair = config.getValueString(confCommPaths); + if (commpaths_pair.first && !commpaths_pair.second.empty()) { + char *commpaths = const_cast(commpaths_pair.second.c_str()); + fprintf(stderr, "Debug: Evaluating commpaths for session: %s\n", commpaths); + if (getFirstValidPath(commpaths, &first_valid, 0) == 0 && first_valid) { + std::string result(first_valid); + free(first_valid); + return result; + } + } + + // Final fallback to $TMPDIR or /tmp + const char *tmpdir = getenv("TMPDIR"); + if (tmpdir) { + return std::string(tmpdir); + } + return std::string("/tmp"); +} int main(int argc, char *argv[]) { - const char *session_dir = get_session_dir(); + // Parse configuration to get sessionpaths + ConfigMap config("[flux-spindle]"); + std::string errmsg; + bool result = gatherAllConfigInfo(argc, argv, false, config, errmsg); + if (!result) { + fprintf(stderr, "Error parsing configuration: %s\n", errmsg.c_str()); + // Continue with defaults rather than failing completely + } + + // Compute session directory + std::string session_dir_str = computeSessionDir(config); + const char *session_dir = session_dir_str.c_str(); + if (argc >= 2 && strcmp(argv[1], "start") == 0) { char **new_argv = strip_start_from_argv(argc, argv); return spindle_session_start(argc - 1, new_argv, session_dir); diff --git a/src/flux/sessionmgr.c b/src/flux/sessionmgr.c index 1267d302..0680277e 100644 --- a/src/flux/sessionmgr.c +++ b/src/flux/sessionmgr.c @@ -106,14 +106,15 @@ char **strip_start_from_argv(int argc, char **argv) return new_argv; } -#define SESSIONPATH "$TMPDIR/spindle/session" +/* DEPRECATED: This function is deprecated. Session directory should now be + * computed from sessionpaths configuration in main.cc using ConfigMap. + * Kept for backward compatibility only. Returns a fallback path. + */ const char *get_session_dir() { - /* This function was originally designed to return a realized version of COMMPATH. - * Since then, COMMPATH has been replaced by COMMPATHS, which can be modified by - * the user on a per-job basis and uses the number_t number as part of the path - * name. Sessions are designed to span multiple jobs, and thus shouldn't be - * piggybacking on COMMPATHS. For now, we'll put in a hardcoded directory. - */ - return strdup(SESSIONPATH); + const char *tmpdir = getenv("TMPDIR"); + if (tmpdir) { + return strdup(tmpdir); + } + return strdup("/tmp"); } diff --git a/src/include/spindle_launch.h b/src/include/spindle_launch.h index c2db2680..308acb97 100644 --- a/src/include/spindle_launch.h +++ b/src/include/spindle_launch.h @@ -133,6 +133,9 @@ typedef struct { /* Path[s] for cached libraries. */ char *candidate_cachepaths; /* Colon-separated list of candidate paths (max 64) */ + /* Path[s] for session management. Sessions span multiple jobs. */ + char *sessionpaths; /* Colon-separated list of candidate paths */ + /* Colon-seperated list of directories where Python is installed */ char *pythonprefix; diff --git a/src/logging/spindle_logc.c b/src/logging/spindle_logc.c index 4e82300f..08a2c511 100644 --- a/src/logging/spindle_logc.c +++ b/src/logging/spindle_logc.c @@ -28,6 +28,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #include #include #include @@ -59,7 +60,7 @@ int run_tests; #define SPAWN_TIMEOUT 300 #define CONNECT_TIMEOUT 100 -extern int spindle_mkdir(char *orig_path); +extern int spindle_mkdir(char *orig_path, bool delete_on_exit); int fileExists(char *name) { @@ -300,7 +301,7 @@ void init_spindle_debugging(char *name, int survive_exec) if (!tempdir || !*tempdir) tempdir = "/tmp"; if (!fileExists(tempdir)) { - spindle_mkdir(tempdir); + spindle_mkdir(tempdir, false); } debug_location = log_level ? "./spindle_output" : NULL; diff --git a/src/server/auditserver/cleanup_proc.cc b/src/server/auditserver/cleanup_proc.cc index d643be2f..54fe3d11 100644 --- a/src/server/auditserver/cleanup_proc.cc +++ b/src/server/auditserver/cleanup_proc.cc @@ -51,7 +51,7 @@ static bool longest_str_first(const string &a, const string &b) return a.size() > b.size(); } -static void rmDirSet(const set &dirs, const char *cachepath, const char *commpath) +static void rmDirSet(const set &dirs, const char *cachepath, const char *commpath, const char *sessionpath) { string path_sep("/"); if( !cachepath || !commpath ){ @@ -62,6 +62,7 @@ static void rmDirSet(const set &dirs, const char *cachepath, const char } size_t cachepath_len = strlen(cachepath); size_t commpath_len = strlen(commpath); + size_t sessionpath_len = (sessionpath && sessionpath[0] != '\0') ? strlen(sessionpath) : 0; for (set::const_iterator i = dirs.begin(); i != dirs.end(); i++) { DIR *dir = opendir(i->c_str()); @@ -79,9 +80,10 @@ static void rmDirSet(const set &dirs, const char *cachepath, const char continue; if ( (strncmp(cachepath, componentpath.c_str(), cachepath_len) != 0) && - (strncmp(commpath, componentpath.c_str(), commpath_len ) != 0) ){ - err_printf( "File for deletion (%s) is outside of cachepath (%s) and commpath (%s).\n", - componentpath.c_str(), cachepath, commpath ); + (strncmp(commpath, componentpath.c_str(), commpath_len ) != 0) && + (sessionpath_len == 0 || strncmp(sessionpath, componentpath.c_str(), sessionpath_len) != 0) ){ + err_printf( "File for deletion (%s) is outside of cachepath (%s), commpath (%s), and sessionpath (%s).\n", + componentpath.c_str(), cachepath, commpath, sessionpath ? sessionpath : "(none)" ); continue; } unlink(componentpath.c_str()); @@ -92,9 +94,10 @@ static void rmDirSet(const set &dirs, const char *cachepath, const char sort(ordered_dirs.begin(), ordered_dirs.end(), longest_str_first); for (vector::iterator i = ordered_dirs.begin(); i != ordered_dirs.end(); i++) { if ( (strncmp(cachepath, i->c_str(), cachepath_len) != 0) && - (strncmp(commpath, i->c_str(), commpath_len) != 0) ){ - err_printf( "Directory for deletion (%s) is outside of cachepath (%s) and commpath (%s).\n", - i->c_str(), cachepath, commpath ); + (strncmp(commpath, i->c_str(), commpath_len) != 0) && + (sessionpath_len == 0 || strncmp(sessionpath, i->c_str(), sessionpath_len) != 0) ){ + err_printf( "Directory for deletion (%s) is outside of cachepath (%s), commpath (%s), and sessionpath (%s).\n", + i->c_str(), cachepath, commpath, sessionpath ? sessionpath : "(none)" ); continue; } rmdir(i->c_str()); @@ -103,16 +106,16 @@ static void rmDirSet(const set &dirs, const char *cachepath, const char class CleanupProc { - friend void init_cleanup_proc(const char *, const char *); + friend void init_cleanup_proc(const char *, const char *, const char *); private: set dirs; int write_dir_fd; int read_dir_fd; bool has_error; pid_t child_pid; - const char *cachepath, *commpath; + const char *cachepath, *commpath, *sessionpath; - CleanupProc(const char *cachepath, const char *commpath); + CleanupProc(const char *cachepath, const char *commpath, const char *sessionpath); void rmDirs(); void cleanupMain(); public: @@ -121,12 +124,13 @@ class CleanupProc bool hadError(); }; -CleanupProc::CleanupProc(const char *cachepath, const char *commpath) : +CleanupProc::CleanupProc(const char *cachepath, const char *commpath, const char *sessionpath) : write_dir_fd(-1), read_dir_fd(-1), has_error(false), cachepath(cachepath), - commpath(commpath) + commpath(commpath), + sessionpath(sessionpath) { int fds[2]; int result; @@ -197,7 +201,7 @@ bool CleanupProc::hadError() void CleanupProc::rmDirs() { - rmDirSet(dirs, cachepath, commpath); + rmDirSet(dirs, cachepath, commpath, sessionpath); } void CleanupProc::cleanupMain() @@ -252,10 +256,10 @@ void CleanupProc::addDir(const char *dir) static CleanupProc *proc = NULL; static set local_dircache; -void init_cleanup_proc(const char *cachepath, const char *commpath) +void init_cleanup_proc(const char *cachepath, const char *commpath, const char *sessionpath) { assert(!proc); - proc = new CleanupProc(cachepath, commpath); + proc = new CleanupProc(cachepath, commpath, sessionpath); if (proc->hadError()) { delete proc; proc = NULL; @@ -281,13 +285,13 @@ int lookup_prev_mkdir(const char *dir) return (i != local_dircache.end()) ? 1 : 0; } -void cleanup_created_dirs(const char *cachepath, const char *commpath) +void cleanup_created_dirs(const char *cachepath, const char *commpath, const char *sessionpath) { if (proc) { proc->triggerCleanup(); } else { debug_printf("Cleaning files with local unlink/rmdirs.\n"); - rmDirSet(local_dircache, cachepath, commpath); + rmDirSet(local_dircache, cachepath, commpath, sessionpath); } } diff --git a/src/server/auditserver/cleanup_proc.h b/src/server/auditserver/cleanup_proc.h index ab8bb939..7d063290 100644 --- a/src/server/auditserver/cleanup_proc.h +++ b/src/server/auditserver/cleanup_proc.h @@ -18,10 +18,10 @@ Place, Suite 330, Boston, MA 02111-1307 USA extern "C" { #endif -void init_cleanup_proc(const char *cachepath, const char *commpath); +void init_cleanup_proc(const char *cachepath, const char *commpath, const char *sessionpath); void track_mkdir(const char *dir); int lookup_prev_mkdir(const char *dir); -void cleanup_created_dirs(const char *cachepath, const char *commpath); +void cleanup_created_dirs(const char *cachepath, const char *commpath, const char *sessionpath); #if defined(__cplusplus) } diff --git a/src/server/auditserver/ldcs_audit_server_filemngt.c b/src/server/auditserver/ldcs_audit_server_filemngt.c index 1d0f410b..93d14249 100644 --- a/src/server/auditserver/ldcs_audit_server_filemngt.c +++ b/src/server/auditserver/ldcs_audit_server_filemngt.c @@ -28,6 +28,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #include #include "ldcs_api.h" @@ -48,19 +49,21 @@ Place, Suite 330, Boston, MA 02111-1307 USA char *_ldcs_audit_server_cachepath; static char *normalized_tmpdir; static char *_ldcs_audit_server_commpath; -extern int spindle_mkdir(char *path); +static char *_ldcs_audit_server_sessionpath; +extern int spindle_mkdir(char *path, bool delete_on_exit); static char *filemngt_normalize_dir(char *dir) { char *newpath = realpath(dir, NULL); return newpath ? newpath : dir; } -int ldcs_audit_server_filemngt_init (char *cachepath, char *commpath) { +int ldcs_audit_server_filemngt_init (char *cachepath, char *commpath, char *sessionpath) { int rc=0; _ldcs_audit_server_cachepath = cachepath; _ldcs_audit_server_commpath = commpath; - if (-1 == spindle_mkdir(_ldcs_audit_server_cachepath)) { + _ldcs_audit_server_sessionpath = sessionpath; + if (-1 == spindle_mkdir(_ldcs_audit_server_cachepath, true)) { err_printf("mkdir: ERROR during mkdir %s\n", _ldcs_audit_server_cachepath); _error("mkdir failed"); } @@ -155,7 +158,7 @@ char *filemngt_calc_localname(char *global_name, calc_local_t reqtype) cut_dirpart_slash = (dirpart[0] == '/') ? 1 : 0; snprintf(target, sizeof(target), "%s%s%s", _ldcs_audit_server_cachepath, endslash, dirpart+cut_dirpart_slash); - spindle_mkdir(target); + spindle_mkdir(target, true); snprintf(target, sizeof(target), "%s%s%s/%s", _ldcs_audit_server_cachepath, endslash, dirpart+cut_dirpart_slash, filepart); @@ -288,7 +291,7 @@ int filemngt_decode_packet(node_peer_t peer, ldcs_message_t *msg, char *filename **/ int ldcs_audit_server_filemngt_clean() { - cleanup_created_dirs(_ldcs_audit_server_cachepath, _ldcs_audit_server_commpath); + cleanup_created_dirs(_ldcs_audit_server_cachepath, _ldcs_audit_server_commpath, _ldcs_audit_server_sessionpath); return 0; } diff --git a/src/server/auditserver/ldcs_audit_server_filemngt.h b/src/server/auditserver/ldcs_audit_server_filemngt.h index 592b9c82..28c71bfd 100644 --- a/src/server/auditserver/ldcs_audit_server_filemngt.h +++ b/src/server/auditserver/ldcs_audit_server_filemngt.h @@ -23,7 +23,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "ldcs_audit_server_md.h" -int ldcs_audit_server_filemngt_init (char *cachepath, char *commpath); +int ldcs_audit_server_filemngt_init (char *cachepath, char *commpath, char *sessionpath); int filemngt_read_file(char *filename, void *buffer, size_t *size, int strip, int *err, int *was_stripped); int filemngt_encode_packet(char *filename, void *filecontents, size_t filesize, diff --git a/src/server/auditserver/ldcs_audit_server_handlers.c b/src/server/auditserver/ldcs_audit_server_handlers.c index ebfdef13..bfc0f92e 100644 --- a/src/server/auditserver/ldcs_audit_server_handlers.c +++ b/src/server/auditserver/ldcs_audit_server_handlers.c @@ -2995,7 +2995,7 @@ int handle_cachepath_consensus(ldcs_process_data_t *procdata) debug_printf2( "The commpath is: %s\n", procdata->commpath ); } - ldcs_audit_server_filemngt_init(procdata->cachepath, procdata->commpath); + ldcs_audit_server_filemngt_init(procdata->cachepath, procdata->commpath, procdata->sessionpath); test_printf(" cachepath=%s\n", procdata->cachepath); return 0; diff --git a/src/server/auditserver/ldcs_audit_server_process.c b/src/server/auditserver/ldcs_audit_server_process.c index 8cd7b936..ed56bb27 100644 --- a/src/server/auditserver/ldcs_audit_server_process.c +++ b/src/server/auditserver/ldcs_audit_server_process.c @@ -147,6 +147,8 @@ int ldcs_audit_server_process(spindle_args_t *args) ldcs_process_data.cachepaths = args->candidate_cachepaths; ldcs_process_data.cachepath = NULL; ldcs_process_data.cachepath_bitidx = 0; + ldcs_process_data.sessionpaths = args->sessionpaths; + ldcs_process_data.sessionpath = NULL; ldcs_process_data.number = args->number; ldcs_process_data.pythonprefix = args->pythonprefix; ldcs_process_data.localprefix = args->local_prefixes; @@ -200,7 +202,7 @@ int ldcs_audit_server_process(spindle_args_t *args) ldcs_process_data.server_stat.hostname=ldcs_process_data.hostname; if (ldcs_process_data.opts & OPT_PROCCLEAN) - init_cleanup_proc(ldcs_process_data.cachepath, ldcs_process_data.commpath); + init_cleanup_proc(ldcs_process_data.cachepath, ldcs_process_data.commpath, ldcs_process_data.sessionpath); /* Calculate location of cache */ debug_printf2("Calculating cache path location\n"); @@ -212,6 +214,19 @@ int ldcs_audit_server_process(spindle_args_t *args) if (result == -1) { err_printf("Could not determine cachepath consensus\n"); return -1; + } + + /* Determine session path if sessionpaths provided */ + if (ldcs_process_data.sessionpaths && ldcs_process_data.sessionpaths[0] != '\0') { + char *first_valid_session = NULL; + debug_printf2("Determining session path from sessionpaths: %s\n", ldcs_process_data.sessionpaths); + result = getFirstValidPath(ldcs_process_data.sessionpaths, &first_valid_session, 0); + if (result == 0 && first_valid_session) { + ldcs_process_data.sessionpath = first_valid_session; + debug_printf2("Session path determined: %s\n", ldcs_process_data.sessionpath); + } else { + debug_printf2("No valid sessionpath found, will fallback to commpath for cleanup\n"); + } } /* Setup connections for clients to start connecting */ diff --git a/src/server/auditserver/ldcs_audit_server_process.h b/src/server/auditserver/ldcs_audit_server_process.h index 4a1734ae..181b3675 100644 --- a/src/server/auditserver/ldcs_audit_server_process.h +++ b/src/server/auditserver/ldcs_audit_server_process.h @@ -155,6 +155,8 @@ struct ldcs_process_data_struct char *parsed_cachepath; /* The cachepath with environment variables replaced. */ /* (Symbolic links, if any, remain.) */ uint64_t cachepath_bitidx; /* Bit index of valid cachepaths on a given server. */ + char *sessionpaths; /* Colon-separated list of candidate sessionpaths. Sessions span jobs. */ + char *sessionpath; /* The session directory path used by this session. */ char *hostname; char *pythonprefix; char *localprefix; diff --git a/src/server/comlib/ldcs_api_pipe.c b/src/server/comlib/ldcs_api_pipe.c index 6b49f296..c9159f20 100644 --- a/src/server/comlib/ldcs_api_pipe.c +++ b/src/server/comlib/ldcs_api_pipe.c @@ -28,6 +28,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #include #include #include @@ -98,7 +99,7 @@ int ldcs_get_fd_pipe (int fd) { } /* end of fd list */ -extern int spindle_mkdir(char *orig_path); +extern int spindle_mkdir(char *orig_path, bool delete_on_exit); int ldcs_create_server_pipe(char* location, number_t number) { (void)number; @@ -111,7 +112,7 @@ int ldcs_create_server_pipe(char* location, number_t number) { char *staging_dir = (char *) malloc(len); snprintf(staging_dir, len, "%s/spindle_comm", location); - if (-1 == spindle_mkdir(staging_dir)) { + if (-1 == spindle_mkdir(staging_dir, true)) { printf("mkdir: ERROR during mkdir %s\n", staging_dir); _error("mkdir failed"); } diff --git a/src/server/config.h.in b/src/server/config.h.in index 87e6242d..d0753d53 100644 --- a/src/server/config.h.in +++ b/src/server/config.h.in @@ -158,6 +158,9 @@ /* Directory to store key files in */ #undef SEC_KEYDIR +/* Colon-separated list of candidate paths for session management */ +#undef SESSIONPATHS + /* Default mode for slurm launch */ #undef SLURMLAUNCH_ENABLED diff --git a/src/server/configure b/src/server/configure index e6e08c67..27f7df34 100755 --- a/src/server/configure +++ b/src/server/configure @@ -841,6 +841,9 @@ with_localstorage with_cachepaths with_cachepath with_commpaths +with_commpath +with_sessionpaths +with_sessionpath with_default_local_prefix with_testrm with_rm @@ -1573,12 +1576,16 @@ Optional Packages: Number of TCP/IP ports to scan for Spindle server communication --with-localstorage=DIR (obsolete) - Use --with-cachepaths and --with-commpath instead. + Use --with-cachepaths and --with-commpaths instead. --with-cachepaths=DIR Colon-separated list of potential back-end cache directories -, - --with-compaths=DIR Colon-separated list of candidate paths for back-end + --with-cachepath=DIR Synonym for --with-cachepaths + --with-commpaths=DIR Colon-separated list of candidate paths for back-end communication and housekeeping + --with-commpath=DIR Synonym for --with-commpaths + --with-sessionpaths=DIR Colon-separated list of candidate paths for session + management + --with-sessionpath=DIR Synonym for --with-sessionpaths --with-default-local-prefix=DIRS Colon-seperated list of directories that Spindle will not cache files out of @@ -16447,7 +16454,7 @@ fi # Check whether --with-localstorage was given. if test "${with_localstorage+set}" = set; then : - withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpath instead." "$LINENO" 5 + withval=$with_localstorage; as_fn_error $? "requested obsolete option --with-localstorage. Use --with-cachepaths and --with-commpaths instead." "$LINENO" 5 fi @@ -16461,7 +16468,7 @@ fi # Check whether --with-cachepath was given. if test "${with_cachepath+set}" = set; then : - withval=$with_cachepath; as_fn_error $? "use --with-cachepaths=DIRS (plural) instead of --with-cachepath=DIR to specify one or more cache paths" "$LINENO" 5 + withval=$with_cachepath; CACHEPATHS=${withval} fi @@ -16473,6 +16480,26 @@ else fi +# Check whether --with-commpath was given. +if test "${with_commpath+set}" = set; then : + withval=$with_commpath; COMMPATHS=${withval} +fi + + +# Check whether --with-sessionpaths was given. +if test "${with_sessionpaths+set}" = set; then : + withval=$with_sessionpaths; SESSIONPATHS=${withval} +else + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} +fi + + # Check whether --with-default-local-prefix was given. if test "${with_default_local_prefix+set}" = set; then : withval=$with_default_local_prefix; SPINDLE_LOCAL_PREFIX=${withval} @@ -16506,6 +16533,11 @@ cat >>confdefs.h <<_ACEOF _ACEOF +cat >>confdefs.h <<_ACEOF +#define SESSIONPATHS "$SESSIONPATHS" +_ACEOF + + cat >>confdefs.h <<_ACEOF #define SPINDLE_LOCAL_PREFIX "$SPINDLE_LOCAL_PREFIX" _ACEOF diff --git a/src/server/startup/Makefile.am b/src/server/startup/Makefile.am index 1b9a7785..30f1eee1 100644 --- a/src/server/startup/Makefile.am +++ b/src/server/startup/Makefile.am @@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libspindlebe_static.la AM_CPPFLAGS = -I$(top_srcdir)/../logging CORE_SOURCES = spindle_be.cc hookexec.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/keyfile.c $(top_srcdir)/../utils/spindle_mkdir.c $(top_srcdir)/../utils/exitnote.c -CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/comlib -I$(top_srcdir)/cache -I$(top_srcdir)/auditserver -I$(top_srcdir)/../client/beboot -I$(top_srcdir)/../include -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DTRACK_MKDIR -DLOOKUP_PREV_MKDIR -DLIBEXECDIR=\"$(pkglibexecdir)\" +CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/comlib -I$(top_srcdir)/cache -I$(top_srcdir)/auditserver -I$(top_srcdir)/../client/beboot -I$(top_srcdir)/../include -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DLIBEXECDIR=\"$(pkglibexecdir)\" CORE_LDADD = $(top_builddir)/logging/libspindledlogc.la -ldl if COBO CORE_LDADD += $(top_builddir)/auditserver/libaudit_server_cobo.la diff --git a/src/server/startup/Makefile.in b/src/server/startup/Makefile.in index 32d2421a..46f5939e 100644 --- a/src/server/startup/Makefile.in +++ b/src/server/startup/Makefile.in @@ -467,7 +467,7 @@ lib_LTLIBRARIES = libspindlebe.la noinst_LTLIBRARIES = libspindlebe_static.la AM_CPPFLAGS = -I$(top_srcdir)/../logging CORE_SOURCES = spindle_be.cc hookexec.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/keyfile.c $(top_srcdir)/../utils/spindle_mkdir.c $(top_srcdir)/../utils/exitnote.c -CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/comlib -I$(top_srcdir)/cache -I$(top_srcdir)/auditserver -I$(top_srcdir)/../client/beboot -I$(top_srcdir)/../include -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DTRACK_MKDIR -DLOOKUP_PREV_MKDIR -DLIBEXECDIR=\"$(pkglibexecdir)\" +CORE_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/comlib -I$(top_srcdir)/cache -I$(top_srcdir)/auditserver -I$(top_srcdir)/../client/beboot -I$(top_srcdir)/../include -I$(top_srcdir)/../utils -I$(top_srcdir)/../cobo -DLIBEXECDIR=\"$(pkglibexecdir)\" CORE_LDADD = $(top_builddir)/logging/libspindledlogc.la -ldl \ $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) $(GCRYPT_LIBS) diff --git a/src/slurm_plugin/Makefile.am b/src/slurm_plugin/Makefile.am index f712463b..97b5305e 100644 --- a/src/slurm_plugin/Makefile.am +++ b/src/slurm_plugin/Makefile.am @@ -5,6 +5,6 @@ libver=`$(top_srcdir)/LIB_VERSION spindleslurm` libspindleslurm_la_SOURCES = encode_decode.c plugin_utils.c slurm_plugin.c $(top_srcdir)/src/utils/spindle_mkdir.c $(top_srcdir)/src/utils/parseloc.c libspindleslurm_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/utils -I$(top_srcdir)/src/include -I$(top_srcdir)/src/logging -DUSE_PLUGIN_DEBUG -DDEBUG -DCUSTOM_GETENV -DCUSTOM_GETENV_FREE -DSCONTROL_BIN="$(SCONTROL_ABSPATH)" -DSINFO_BIN="$(SINFO_ABSPATH)" -DSPINDLE_DO_EXPORT libspindleslurm_la_LDFLAGS = $(AM_LDFLAGS) -ldl -version-info $(libver) -libspindleslurm_la_LIBADD = $(top_builddir)/src/server/startup/libspindlebe.la $(top_builddir)/src/fe/startup/libspindlefe.la +libspindleslurm_la_LIBADD = $(top_builddir)/src/server/startup/libspindlebe.la $(top_builddir)/src/fe/startup/libspindlefe_static.la libspindleslurm_la_CFLAGS = $(CFLAGS) -fvisibility=hidden libspindleslurm_la_CXXFLAGS = $(CXXFLAGS) -fvisibility=hidden diff --git a/src/slurm_plugin/Makefile.in b/src/slurm_plugin/Makefile.in index 8d3f3643..9bbfefde 100644 --- a/src/slurm_plugin/Makefile.in +++ b/src/slurm_plugin/Makefile.in @@ -136,7 +136,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libspindleslurm_la_DEPENDENCIES = \ $(top_builddir)/src/server/startup/libspindlebe.la \ - $(top_builddir)/src/fe/startup/libspindlefe.la + $(top_builddir)/src/fe/startup/libspindlefe_static.la am__dirstamp = $(am__leading_dot)dirstamp am_libspindleslurm_la_OBJECTS = libspindleslurm_la-encode_decode.lo \ libspindleslurm_la-plugin_utils.lo \ @@ -385,7 +385,7 @@ libver = `$(top_srcdir)/LIB_VERSION spindleslurm` libspindleslurm_la_SOURCES = encode_decode.c plugin_utils.c slurm_plugin.c $(top_srcdir)/src/utils/spindle_mkdir.c $(top_srcdir)/src/utils/parseloc.c libspindleslurm_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/utils -I$(top_srcdir)/src/include -I$(top_srcdir)/src/logging -DUSE_PLUGIN_DEBUG -DDEBUG -DCUSTOM_GETENV -DCUSTOM_GETENV_FREE -DSCONTROL_BIN="$(SCONTROL_ABSPATH)" -DSINFO_BIN="$(SINFO_ABSPATH)" -DSPINDLE_DO_EXPORT libspindleslurm_la_LDFLAGS = $(AM_LDFLAGS) -ldl -version-info $(libver) -libspindleslurm_la_LIBADD = $(top_builddir)/src/server/startup/libspindlebe.la $(top_builddir)/src/fe/startup/libspindlefe.la +libspindleslurm_la_LIBADD = $(top_builddir)/src/server/startup/libspindlebe.la $(top_builddir)/src/fe/startup/libspindlefe_static.la libspindleslurm_la_CFLAGS = $(CFLAGS) -fvisibility=hidden libspindleslurm_la_CXXFLAGS = $(CXXFLAGS) -fvisibility=hidden all: all-am diff --git a/src/slurm_plugin/plugin_utils.c b/src/slurm_plugin/plugin_utils.c index e97fc85f..160e2c7b 100644 --- a/src/slurm_plugin/plugin_utils.c +++ b/src/slurm_plugin/plugin_utils.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "plugin_utils.h" #include "parseloc.h" @@ -33,7 +34,7 @@ extern char *parse_location(char *loc, number_t number); extern char *realize(char *path); -extern int spindle_mkdir(char *orig_path); +extern int spindle_mkdir(char *orig_path, bool delete_on_exit); int srunAllNodes(unsigned int num_nodes, const char *command) { @@ -520,7 +521,7 @@ int isBEProc(spindle_args_t *params, unsigned int exit_phase) unique_file = (char *) malloc(sizeof(char*) * unique_file_len); snprintf(unique_file, unique_file_len, "%s/%s.%s.%s.%s", realized_dir, UNIQUE_FILE_NAME, phase_name, hostname, session_id_str); - spindle_mkdir(realized_dir); + spindle_mkdir(realized_dir, false); fd = open(unique_file, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); error = errno; diff --git a/src/utils/parseloc.c b/src/utils/parseloc.c index 01183d01..f5f5a88f 100644 --- a/src/utils/parseloc.c +++ b/src/utils/parseloc.c @@ -23,6 +23,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #if !defined(USE_PLUGIN_DEBUG) #include "spindle_debug.h" @@ -35,7 +36,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "ccwarns.h" #include "spindle_launch.h" -extern int spindle_mkdir(char *orig_path); +extern int spindle_mkdir(char *orig_path, bool delete_on_exit); #if defined(CUSTOM_GETENV) extern char *custom_getenv(char*); @@ -315,7 +316,7 @@ static int validateCandidatePath( char *candidatePath, char **realizedPath, char if( parsedCandidatePath ){ realizedCandidatePath = realize( parsedCandidatePath ); if( realizedCandidatePath ){ - rc = spindle_mkdir( parsedCandidatePath ); + rc = spindle_mkdir( parsedCandidatePath, false ); if( 0 == rc ){ // candidatePath is going to be freed in the calling function. // symbolicPath needs a strdup(). parsedPath() and realizedPath() diff --git a/src/utils/spindle_mkdir.c b/src/utils/spindle_mkdir.c index cd36e9d6..8c189548 100644 --- a/src/utils/spindle_mkdir.c +++ b/src/utils/spindle_mkdir.c @@ -19,6 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #if !defined(USE_PLUGIN_DEBUG) #include "spindle_debug.h" @@ -30,13 +31,20 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "ldcs_api.h" #include "config.h" +// Weak symbols allow linking without cleanup_proc.cc (e.g., in client code) +void track_mkdir(const char *dir) __attribute__((weak)); +int lookup_prev_mkdir(const char *dir) __attribute__((weak)); -#if defined(TRACK_MKDIR) -extern void track_mkdir(const char *dir); -#endif -#if defined(LOOKUP_PREV_MKDIR) -extern int lookup_prev_mkdir(const char *dir); -#endif +void track_mkdir(const char *dir) { + // Stub for when cleanup_proc is not linked + (void)dir; +} + +int lookup_prev_mkdir(const char *dir) { + // Stub for when cleanup_proc is not linked + (void)dir; + return 0; +} static int checkdir(char *path) @@ -72,14 +80,14 @@ static int checkdir(char *path) return 0; } -int spindle_mkdir(char *orig_path) +int spindle_mkdir(char *orig_path, bool delete_on_exit) { char path[MAX_PATH_LEN+1]; int i, path_len, result, do_mkdir = 0, error; struct stat buf; char orig_char; - debug_printf2("spindle_mkdir on %s\n", orig_path); + debug_printf2("spindle_mkdir on %s (delete_on_exit=%d)\n", orig_path, delete_on_exit); strncpy(path, orig_path, sizeof(path)); @@ -96,14 +104,12 @@ int spindle_mkdir(char *orig_path) orig_char = path[i]; path[i] = '\0'; -#if defined(LOOKUP_PREV_MKDIR) - if (!do_mkdir) { + if (delete_on_exit && !do_mkdir) { result = lookup_prev_mkdir(path); if (result == 1) { do_mkdir = 1; } } -#endif if (!do_mkdir) { //Run a stat on an existing path component. As long as a directory //component already exists, we won't be too picky about its ownership. @@ -142,9 +148,9 @@ int spindle_mkdir(char *orig_path) } else { debug_printf3("Did a mkdir(%s)\n", path); -#if defined(TRACK_MKDIR) - track_mkdir(path); -#endif + if (delete_on_exit) { + track_mkdir(path); + } } } path[i] = orig_char; @@ -155,7 +161,7 @@ int spindle_mkdir(char *orig_path) } if (!do_mkdir) { - //We never did any mkdirs. Ensure that the final directory in the existing path + //We never did any mkdirs. Ensure that the final directory in the existing path // is exclusively ours. if (checkdir(path) == -1) { return -1; diff --git a/testsuite/run_driver_template b/testsuite/run_driver_template index fddf2d3e..e48a3fa8 100644 --- a/testsuite/run_driver_template +++ b/testsuite/run_driver_template @@ -15,7 +15,7 @@ if [ $1 == --start-session ] ; then if [ "x$TEST_RM" == "xslurm-plugin" ] ; then exit 0 fi - export SPINDLEID=`$SPINDLE --start-session --level=high` + export SPINDLEID=`$SPINDLE --start-session --level=high --sessionpaths=/bad/session/path:$TMPDIR/spindlesessions` if [ x$SPINDLEID == x ]; then echo ANONYMOUS_SESSION else