Bug 14539

Summary: job_submit.lua.example script error: Use of log.user() in job_modify is not supported
Product: Slurm Reporter: Ole.H.Nielsen <Ole.H.Nielsen>
Component: ConfigurationAssignee: Marcin Stolarek <cinek>
Status: RESOLVED FIXED QA Contact:
Severity: 4 - Minor Issue    
Priority: --- CC: alex, cinek
Version: 21.08.8   
Hardware: Linux   
OS: Linux   
See Also: https://bugs.schedmd.com/show_bug.cgi?id=4038
https://bugs.schedmd.com/show_bug.cgi?id=4391
Site: DTU Physics Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: 23.02pre1 Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---
Attachments: job_submit.lua script

Description Ole.H.Nielsen@fysik.dtu.dk 2022-07-14 03:38:51 MDT
Created attachment 25860 [details]
job_submit.lua script

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.

Thanks,
Ole
Comment 1 Marcin Stolarek 2022-07-18 02:49:05 MDT
Ole,

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.

cheers,
Marcin
Comment 3 Ole.H.Nielsen@fysik.dtu.dk 2022-07-19 01:30:05 MDT
Hi Marcin,

(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...

Thanks,
Ole
Comment 15 Marcin Stolarek 2022-09-23 07:33:39 MDT
Ole,

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[1].

I'm closing the bug as fixed now. Should you have any questions please reopen.

cheers,
Marcin
[1]https://github.com/SchedMD/slurm/commit/9b2776aad9262fc431fd20f6f71ff7c817d46dac
Comment 16 Ole.H.Nielsen@fysik.dtu.dk 2022-09-23 07:39:56 MDT
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
Comment 17 Alejandro Sanchez 2023-01-04 07:19:34 MST
*** Bug 4391 has been marked as a duplicate of this bug. ***