The source project of this merge request has been removed.
Switching order of functions performing lrms_done file creation and writing to the diag file. (Fixes BUGZ-3995)
Begin arcbot message
This merge request is automatically copied from !1143 (merged) orginally made by @maikenp
End arcbot message
In job-helper.errors some jobs report:
scan-SLURM-job: diag file not found at ...
This seems to be because the diag file is already moved from the sessiondir to the controldir.
Switching the order of the function calls handle_exit_code and handle_diag_file, so that handle_diag_file is called first fixes the problem.
In handle_exit_code the lrms_done file is created, and if gm discovers this before the processing of handle_diag_file is done, the file will be moved, and thus gone from the sessiondir, causing the error mentioned above.