Catch sbatch errors in CLI commands
Merged
requested to merge mdefende/gpfs-policy:bugfix-catch-slurm-fail-to-submit-errors into patch-v0.5.1
Whenever sbatch
exits with an error, the error is just passed to the .err log for the invoking job, but the job is marked as COMPLETED in the sacct log. This makes it difficult to determine how much data was not processed because the jobs just weren't submitted at all. This MR wraps the subprocess.run
calls for sbatch
in try-except
blocks that pass any stderr
messages back from the subprocess to the invoking command and raises an exception instead of exiting normally. This will mark those jobs as FAILED in the sacct database instead of COMPLETED.
Merge request reports
Activity
Filter activity
Please register or sign in to reply