Ticket 10881

Summary: scrontab doesn't accept --open-mode=append as a #SCRON option
Product: Slurm Reporter: Chris Samuel (NERSC) <csamuel>
Component: User CommandsAssignee: Tim McMullan <mcmullan>
Status: RESOLVED FIXED QA Contact:
Severity: 4 - Minor Issue    
Priority: --- CC: agaur, dmjacobsen
Version: 20.11.3   
Hardware: Linux   
OS: Linux   
Site: NERSC 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: 20.11.5 21.08pre1 Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Chris Samuel (NERSC) 2021-02-16 16:04:28 MST
Hi there,

One of our staff testing scrontab has found that it's not possible to tell scrontab to append output to a file with:

#SCRON --open-mode=append

they get:

#BAD: #SCRON --open-mode=append

Any ideas?

All the best,
Chris
Comment 2 Tim McMullan 2021-02-18 14:44:01 MST
Hey Chris!

Its documented that the valid options for SCRON are a subset of the ones that exist for srun/sbatch/salloc, and after looking around in the code for a while its clear that this is just one of the options that isn't currently supported.

That said, supporting this option makes a lot of sense... so I'm looking at the best way to get the option supported for SCRON as well.

I'll let you know when I have made more progress on it!

Thanks!
--Tim
Comment 3 Chris Samuel (NERSC) 2021-02-18 14:50:00 MST
Hi Tim,

Totally understand, I opened it as it's causing issues for staff looking at how to migrate users from the old crontab command to this and I suspect if it's hitting them it would hit others too.

Thanks so much!

All the best,
Chris
Comment 6 Tim McMullan 2021-02-26 06:37:49 MST
Hi Chris!

We've added support for the --open-mode option on the SCRON lines.  This support should be added in 20.11.5 (when it comes out), and consists of these commits:

https://github.com/SchedMD/slurm/commit/27a7c1b24a090fe1768d94a8dff2e8ba63ec5935
https://github.com/SchedMD/slurm/commit/9ad3df5d620cdc4d1ecba2ef9fe1e40dac66fd7c
https://github.com/SchedMD/slurm/commit/357c61201c552ed529bbdf69828bca3fe54b6e23
https://github.com/SchedMD/slurm/commit/537bb01a6eb2ba2988721115f1ff59b8e5396eb9

Let me know if these work for you!

Thanks,
--Tim
Comment 7 Chris Samuel (NERSC) 2021-03-02 14:18:31 MST
Hey Tim,

That's great, thanks so much!

All the best,
Chris
Comment 8 Tim McMullan 2021-03-02 14:33:36 MST
Thanks Chris!

I'm going to resolve this for now, let us know if anything else comes up!

--Tim
Comment 9 Chris Samuel (NERSC) 2021-03-02 14:36:53 MST
Hi Tim,

Will do, my plate is a little too full at the moment to get these onto our test system, I should have mentioned that in the previous message sorry!

All the best,
Chris