Cron and logrotate files not created in Ubuntu 20 install? #134
-
Thanks for providing these great mail scripts! They are working just fine, but I made some observations I'd like to share. I installed slurm-mail from the Ubuntu 20 repo and in the beginning, everything was working as expected, but after a while, I noticed that e-mails got stuck in /var/spool/slurm-mail. As I was expecting that the cron script was in place, I was looking for other causes. Running /usr/bin/slurm-send-mail -v as suggested in the troubleshooting section worked well and without any error messages, but new e-mails got stuck again. Now I noticed that the owner of /var/log/slurm-mail/slurm-send-mail.log was root, while for slurm-spool-mail.log it was slurm. Accordingly, when I do runuser -u slurm -- /usr/bin/slurm-send-mail -v the job fails, saying it can't write to the log file. Like I said above, it works fine with the cron-job, but maybe it'd be possible to have slurmctld send the e-mails instead if only the log file had the right permission? And was that fact that the scripts for cron and logrotate did not install a bug or intentional? In the later case, I suggest to emphasize in the readme that they need to be installed manually. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I've tested Slurm-Mail 4.19 with Ubtuntu 20 and I can see that the Are these missing on your set-up? Be careful running the Slurm-Mail scripts as If this happens, then when Slurm tries to run You could run the following command as chown slurm. -R /var/log/slurm-mail /var/spool/slurm-mail |
Beta Was this translation helpful? Give feedback.
Hi,
I've tested Slurm-Mail 4.19 with Ubtuntu 20 and I can see that the
/etc/cron.d/slurm-mail
and/etc/logrotate.d/slurm-mail
files are installed ok.Are these missing on your set-up?
Be careful running the Slurm-Mail scripts as
root
as this will cause the log file ownership to change fromslurm
toroot
if they did not already exist.If this happens, then when Slurm tries to run
/usr/bin/slurm-spool-mail
it will fail.You could run the following command as
root
to make sure everything is as it should be: