Extensibility for non-writable default PIGO_SCRATCH - #7
Open
sarsaeroth wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4 .
BigSpace::BigSpace()retriesmkdirindefinitely whenPIGO_SCRATCHis not writable to the runtime user. The retry is correct forEEXIST(random suffix collisions) but not forEACCES, where every retry hits the same permission denial. This silently breaks Pando in any deployment where/scratchis 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_DIRconfiguration knob so users on non-default systems can override the location.Changes:
build_images.sh:SCRATCH_DIRvalidation inbuild_sif(). NewSCRATCH_DIRenvironment 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/scratchconfigurations can override viaSCRATCH_DIR=/tmp ./build_images.sh.code/test/test.hpp:mkdir-probe inTESTS_BEGIN. A singlemkdirattempt at/scratch/_pando_test_proberuns immediately after theargccheck; on failure the test binary returnsEXIT_FAILUREwith theerrnomessage instead of hanging.