Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SlurmScheduler
: Detect broken submission scripts for invalid account
If an invalid combination of the `account` and `partition` options are provided the submission will fail. Currently the scheduler plugin will raise a generic exception causing the expontential backoff mechanism to kick in. This is pointless, however, as the problem is not transient and the submission will always fail, unless the scheduler script is updated, which is not possible, since it breaks provenance. The solution is to make use of the recently introduced feature for the `_parse_submit_output` method to return an instance of `ExitCode` which will trigger the engine to terminate the process. If an invalid account or combination of account and partition are defined, the error will be: Invalid account or account/partition combination specified This error is printed to the `stderr`. When detected, the new exit code `ERROR_SCHEDULER_INVALID_ACCOUNT` is returned. The `ERROR_SCHEDULER_INVALID_ACCOUNT` exit code uses status `131`. The idea is that the range 130 - 139 is reserved for errors that occur when the job script submission fails. The status 130 is kept open for a more general exit code that may be defined in the future.
- Loading branch information