ERROR File already exists if a leftover container directory from the previous attempt is still on the node. Give each attempt a unique --container-name, or add an Epilog script that removes leftover pyxis_* directories after the job ends.
Symptoms
The next start after preemption or requeue fails with errors similar to the following:pyxis: container exited too soon failure on a fresh launch is a different problem.
Check for leftover directories
The enroot runtime extracts container data underENROOT_DATA_PATH. On SUNK, that path defaults to /opt/sunk/tmp/enroot-data/user-$(id -u). For details, see Node-local storage and temporary files on Slurm nodes.
The slurmstepd error output names the failing node. You can also read it from sacct, then open a shell on that node without starting a container:
Use a unique container name
Pass a--container-name that changes when Slurm restarts the job. Replace [USERNAME] and [IMAGE] with your values.
srun inside the same job. If your workflow needs a fixed name, use the Epilog cleanup instead.
Drop --kill-on-bad-exit
--kill-on-bad-exit terminates the step as soon as any task exits non-zero. Slurm then sends SIGKILL right away instead of its usual SIGTERM and KillWait sequence, which leaves Pyxis less time to remove the container directory. Dropping the flag makes leftover directories less frequent. It doesn’t prevent them.
Clean leftover directories in the Epilog
SUNK administrators can remove leftover directories in a job Epilog, which runs after the job has fully stopped. Add a script under/etc/slurm/epilog.d/ with compute.managedEpilogConfig or a user-managed Epilog ConfigMap. For details, see Run Prolog and Epilog scripts on SUNK.
Related
- Node-local storage and temporary files on Slurm nodes
- Run Prolog and Epilog scripts on SUNK
- How do I run containers with Pyxis and Enroot in Slurm?
Workload Scheduling Server Errors