Created attachment 25860 [details]
We have enabled a job_submit.lua script based on the Slurm source file etc/job_submit.lua.example. It seems that there is an error in the example function slurm_job_modify() due to the calling of _log_user_and_debug()
When running the attached job_submit.lua script we get some errors in the slurmctld log:
[2022-07-14T11:05:05.188] error: Use of log.user() in job_modify is not supported. Message discarded: ("slurm_job_modify: No partition specified, please specify partition")
Obviously, slurmctld reports an error when slurm.log_user() is called from _log_user_and_debug() by slurm_job_modify()
It seems that the job_submit.lua.example script must be modified to *not* call _log_user_and_debug but in stead call only slurm.log_debug() when needed.
I can confirm that the example isn't correct in regards to error message returned to end user. However, I'll double check with our senior members if we want to change the example or we'll implement the possibility to return message to user from job_modify.
I'll keep you posted.
(In reply to Marcin Stolarek from comment #1)
> I can confirm that the example isn't correct in regards to error message
> returned to end user. However, I'll double check with our senior members if
> we want to change the example or we'll implement the possibility to return
> message to user from job_modify.
Thanks for investigating this issue. IMHO, it would be preferable to return a message to the user from job_modify when he tries to modify his job. Otherwise he wouldn't know what went wrong...
We've added the functionality of log_user slurm master branch (Slurm 23.02 to be) in commits 85e92d048f..e811c3f2e5 and added a comment to job_submit.lua.example about that.
I'm closing the bug as fixed now. Should you have any questions please reopen.
I'm out of the office, back on September 26.
Jeg er ikke på kontoret, tilbage den 26/9.
Best regards / Venlig hilsen,
Ole Holm Nielsen
*** Bug 4391 has been marked as a duplicate of this bug. ***