City wants Slurm jobs to mount civic datasets safely at start and clean up at end. What practice fits?
Select an answer to reveal the explanation.
Short Explanation
Prolog and epilog are the job’s door check and close-up—mount civic data cleanly, then tidy without scattering root passwords. Stuffing passwords into user scripts or skipping cleanup invites sprawl. Interactive sudo does not scale for batch.
Full Explanation
Cities often need jobs to mount civic datasets at start and unmount or clean temporary state at end without embedding secrets in user scripts. Hardened Slurm prolog and epilog scripts run under controlled privileges at job boundaries: the prolog can establish approved mounts or credentials for that allocation, and the epilog tears them down so orphan mounts do not accumulate on GPU nodes. This keeps municipal dataset access centralized, auditable, and free of passwordless root sprawl across every researcher script. Embedding citywide root passwords in every user job script spreads credentials, invites leakage in git and logs, and makes rotation nearly impossible. Skipping cleanup leaves orphan mounts and stale credentials on shared GPU nodes, increasing cross-job exposure. Requiring interactive sudo on each node before every batch job cannot scale—batch jobs are non-interactive and would stall waiting for humans. Exam caveat: prolog/epilog failures can fail or hang jobs; scripts must be idempotent, timeout-safe, and privilege-minimal (sudoers rules for specific mount helpers, not blanket root). Operational check: submit a batch job that needs a civic dataset, confirm the mount appears only for the job window, verify epilog cleanup on exit/cancel, and ensure no citywide passwords appear in user scripts or job stdout.