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..3a1ee0c0 --- /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-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 + 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 diff --git a/config.h.in b/config.h.in index 00b83ef3..6d724489 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 @@ -143,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 6b54926e..f47c68dd 100755 --- a/configure +++ b/configure @@ -850,7 +850,10 @@ with_default_num_ports 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-compath=DIR Back-end directory for communication and - housekeeping + --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,15 +16696,35 @@ 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 + + +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} +else + COMMPATHS=$DEFAULT_LOC fi # Check whether --with-commpath was given. if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} + 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 - COMMPATH=$DEFAULT_LOC + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} fi @@ -16705,7 +16732,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 @@ -16725,7 +16752,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF @@ -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 1b187f2e..94395322 100644 --- a/configure.common.ac +++ b/configure.common.ac @@ -18,30 +18,43 @@ 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-compath=DIR],[Back-end directory for communication and housekeeping])], - [COMMPATH=${withval}], - [COMMPATH=$DEFAULT_LOC]) + [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}], - [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([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/containers/spindle-flux-ubuntu/scripts/build_spindle.sh b/containers/spindle-flux-ubuntu/scripts/build_spindle.sh index 276c59a6..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 --enable-crash-dedup 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 b48e3b53..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 --enable-crash-dedup 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 8b759415..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 --enable-crash-dedup 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 4a4c5eee..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 --enable-crash-dedup 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..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" @@ -33,6 +34,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 +55,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; @@ -85,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); @@ -168,7 +170,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 +184,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 +194,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 +349,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/client_comlib/client_api.c b/src/client/client_comlib/client_api.c index 07735226..86c8ffc7 100644 --- a/src/client/client_comlib/client_api.c +++ b/src/client/client_comlib/client_api.c @@ -43,8 +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; message.header.len = 0; @@ -70,8 +68,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/client/config.h.in b/src/client/config.h.in index 872b9278..cf0e0091 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 @@ -130,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 18f13fa5..0b40c361 100755 --- a/src/client/configure +++ b/src/client/configure @@ -813,7 +813,10 @@ with_default_num_ports 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-compath=DIR Back-end directory for communication and - housekeeping + --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,15 +12621,35 @@ 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 + + +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} +else + COMMPATHS=$DEFAULT_LOC fi # Check whether --with-commpath was given. if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} + 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 - COMMPATH=$DEFAULT_LOC + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} fi @@ -12630,7 +12657,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 @@ -12650,7 +12677,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF @@ -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 20a30383..6dc219ff 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 @@ -175,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 73def515..12bcbc66 100755 --- a/src/fe/configure +++ b/src/fe/configure @@ -834,7 +834,10 @@ with_default_num_ports 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-compath=DIR Back-end directory for communication and - housekeeping + --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,15 +16471,35 @@ 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 + + +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} +else + COMMPATHS=$DEFAULT_LOC fi # Check whether --with-commpath was given. if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} + 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 - COMMPATH=$DEFAULT_LOC + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} fi @@ -16480,7 +16507,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 @@ -16500,7 +16527,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF @@ -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 e1368642..7cbc6e18 100644 --- a/src/fe/startup/config_mgr.cc +++ b/src/fe/startup/config_mgr.cc @@ -50,18 +50,34 @@ 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 +#elif defined(COMMPATH) +#define SPINDLE_COMMPATHS_STR COMMPATH #else -#define SPINDLE_COMMPATH_STR "$TMPDIR" +#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 +#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 @@ -279,10 +295,18 @@ 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, - "Back-end directory communication and housekeeping. Should be a non-shared location such as a ramdisk." }, + { confCommPaths, "commpaths", shortCommPaths, groupMisc, cvString, {}, SPINDLE_COMMPATHS_STR, + "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." }, + { 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, @@ -751,11 +775,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. @@ -768,10 +789,19 @@ 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 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: 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 14f18b7a..aac94870 100644 --- a/src/fe/startup/config_mgr.h +++ b/src/fe/startup/config_mgr.h @@ -29,8 +29,9 @@ enum SpindleConfigID { confCmdlineNewgroup, confPort, confNumPorts, - confCommPath, + confCommPaths, confCachePaths, + confSessionPaths, confCachePrefix, confPythonPrefix, confLocalPrefix, @@ -84,7 +85,7 @@ enum CmdlineShortOptions { shortAuditType = 'k', shortRelocSO = 'l', shortNoClean = 'n', - shortCommPath = 'o', + shortCommPaths = 'o', shortPush = 'p', shortPull = 'q', shortPythonPrefix = 'r', @@ -130,6 +131,7 @@ enum CmdlineShortOptions { shortPatchLdso = 299, shortCachePaths = 300, shortCrashDedup = 301, + shortSessionPaths = 302, }; enum CmdlineGroups { diff --git a/src/fe/startup/parse_launcher.cc b/src/fe/startup/parse_launcher.cc index 4484e998..9edb3f23 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" @@ -286,12 +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); + int rc = getFirstValidPath( params->commpaths, &( params->commpath ), params->number ); + if( rc != 0 ){ + return -1; + } string commpath(params->commpath); char number_str[32]; @@ -323,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 @@ -336,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) @@ -367,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, diff --git a/src/fe/startup/spindle_fe.cc b/src/fe/startup/spindle_fe.cc index f1daab9e..e0fc0fe1 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); @@ -398,11 +398,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/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/flux-spindle.c b/src/flux/flux-spindle.c index a3abeef7..cb9a421a 100644 --- a/src/flux/flux-spindle.c +++ b/src/flux/flux-spindle.c @@ -382,7 +382,7 @@ static int sp_getopts (flux_shell_t *shell, struct spindle_ctx *ctx) int crash_dedup = 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) @@ -416,7 +416,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, @@ -468,8 +468,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 (crash_dedup) { ctx->params.opts |= OPT_CRASH_HANDLER; 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 17027163..0680277e 100644 --- a/src/flux/sessionmgr.c +++ b/src/flux/sessionmgr.c @@ -106,27 +106,15 @@ 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 +/* 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() { - 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; + const char *tmpdir = getenv("TMPDIR"); + if (tmpdir) { + return strdup(tmpdir); } - return dir; + return strdup("/tmp"); } diff --git a/src/include/spindle_launch.h b/src/include/spindle_launch.h index 98121396..308acb97 100644 --- a/src/include/spindle_launch.h +++ b/src/include/spindle_launch.h @@ -127,9 +127,15 @@ 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) */ + /* 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 14c85b47..d0753d53 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 @@ -157,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 71d5fb82..27f7df34 100755 --- a/src/server/configure +++ b/src/server/configure @@ -840,7 +840,10 @@ with_default_num_ports 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-compath=DIR Back-end directory for communication and - housekeeping + --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,15 +16468,35 @@ 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 + + +# Check whether --with-commpaths was given. +if test "${with_commpaths+set}" = set; then : + withval=$with_commpaths; COMMPATHS=${withval} +else + COMMPATHS=$DEFAULT_LOC fi # Check whether --with-commpath was given. if test "${with_commpath+set}" = set; then : - withval=$with_commpath; COMMPATH=${withval} + 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 - COMMPATH=$DEFAULT_LOC + SESSIONPATHS=$COMMPATHS +fi + + +# Check whether --with-sessionpath was given. +if test "${with_sessionpath+set}" = set; then : + withval=$with_sessionpath; SESSIONPATHS=${withval} fi @@ -16477,7 +16504,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 @@ -16497,7 +16524,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define COMMPATH "$COMMPATH" +#define COMMPATHS "$COMMPATHS" _ACEOF @@ -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/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..97b5305e 100644 --- a/src/slurm_plugin/Makefile.am +++ b/src/slurm_plugin/Makefile.am @@ -3,8 +3,8 @@ 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_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 a7fe188f..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 \ @@ -383,9 +383,9 @@ 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_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 f77531e4..160e2c7b 100644 --- a/src/slurm_plugin/plugin_utils.c +++ b/src/slurm_plugin/plugin_utils.c @@ -11,7 +11,9 @@ #include #include #include +#include #include "plugin_utils.h" +#include "parseloc.h" #if !defined(STR) #define XSTR(X) #X @@ -32,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) { @@ -297,46 +299,19 @@ 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) { - char *realized_dir, *socket_path = NULL; + char *realized_dir = NULL, *socket_path = NULL; 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 +500,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'; @@ -543,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/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..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() @@ -370,6 +371,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 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