[slurm-users] Problem with sbatch

Daniel Torregrosa daniel.torregrosa at insight-centre.org
Tue Jul 9 10:16:11 UTC 2019


Thanks a lot for the answers!

So, if I understand this correctly, for some reason, `srun` does not need
root privileges on the computation node side, but `sbatch` does when
scheduling. I was afraid doing so would mean users could do things such as
apt install and such, but it does not seem the case.

I am not going to be managing the actual cluster, only exploring
possibilities. At this point I am mostly convinced slurmdUser=sudo is safe,
so that is one less potential problem.

Maybe I should open a new thread, but, for some reason, when I submit

--
#! /bin/bash
#SBATCH -J myjob
#SBATCH -uid test

whoami
--

the execution silently fails, and the log in the computation node says
"/home/test/d" does not exist. According to the documentation, -uid is
intended for sudo to emulate sending jobs as different users, but the
behaviour is a bit odd...

@Patrick: I do not know how to do that. I only know that I can make slurm
sudoer and NOPASSWD, but slurm would still call to `chown` (not `sudo
chown`). An alternative would be replacing `chown` with a small script that
calls `sudo chown`, but that is likely to break a lot of stuff. I assume
slurmd will also need other root-only commands to work.

@Michael Indeed, the documentation/tutorials often mention that SlurmdUser
should be root, but it is not clearly explained why anywhere (e.g.
https://slurm.schedmd.com/quickstart_admin.html section Daemons). It seems
that `srun whoami` returns the current user (and not root), so even when
slurmdUser is root, users do not have privileges, so in principle there is
no problem at all.

@Jeffrey It is expected to be multi-user. As for your third option, I think
you refer to something similar to what I wrote for Patrick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20190709/a2ace74f/attachment.htm>


More information about the slurm-users mailing list