Bug 14539 - job_submit.lua.example script error: Use of log.user() in job_modify is not supported
Summary: job_submit.lua.example script error: Use of log.user() in job_modify is not s...
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: Configuration (show other bugs)
Version: 21.08.8
Hardware: Linux Linux
: --- 4 - Minor Issue
Assignee: Marcin Stolarek
QA Contact:
URL:
: 4391 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-14 03:38 MDT by Ole.H.Nielsen@fysik.dtu.dk
Modified: 2023-01-26 17:44 MST (History)
2 users (show)

See Also:
Site: DTU Physics
Alineos Sites: ---
Bull/Atos Sites: ---
Confidential Site: ---
Cray Sites: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
OCF Sites: ---
SFW Sites: ---
SNIC sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed: 23.02pre1
Target Release: ---
DevPrio: ---


Attachments
job_submit.lua script (5.55 KB, text/x-lua)
2022-07-14 03:38 MDT, Ole.H.Nielsen@fysik.dtu.dk
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***