Skip to content

Extensibility for non-writable default PIGO_SCRATCH - #7

Open
sarsaeroth wants to merge 1 commit into
sandialabs:mainfrom
sarsaeroth:fr-4
Open

Extensibility for non-writable default PIGO_SCRATCH#7
sarsaeroth wants to merge 1 commit into
sandialabs:mainfrom
sarsaeroth:fr-4

Conversation

@sarsaeroth

Copy link
Copy Markdown

Closes #4 .
BigSpace::BigSpace() retries mkdir indefinitely when PIGO_SCRATCH is not writable to the runtime user. The retry is correct for EEXIST (random suffix collisions) but not for EACCES, where every retry hits the same permission denial. This silently breaks Pando in any deployment where /scratch is root-owned, restricted, or bound from a non-writable host directory and produces no actionable diagnostic at the source.
This PR validates writability at two natural choke points so failures surface immediately with clear errors, and introduces a SCRATCH_DIR configuration knob so users on non-default systems can override the location.

Changes:

  • build_images.sh: SCRATCH_DIR validation in build_sif(). New SCRATCH_DIR environment variable (default=/scratch) is validated to exist and be writable before any SIF is built. singularity build --bind "$SCRATCH_DIR:/scratch" propagates the bind into the build environment. Users with non-default /scratch configurations can override via SCRATCH_DIR=/tmp ./build_images.sh.
  • code/test/test.hpp: mkdir-probe in TESTS_BEGIN. A single mkdir attempt at /scratch/_pando_test_probe runs immediately after the argc check; on failure the test binary returns EXIT_FAILURE with the errno message instead of hanging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Add support for non-writable default PIGO_SCRATCH directories

1 participant