Dear All,
we have added a script to pam.d, so upon user login to our head node the
slurm user (and account if needed) is created.
best regards
Markus
On 02/19/2015 12:42 PM, Ben Polman wrote:
jupiter wrote on 02/19/15 12:23:
H Jupiter,
I see, our users are not that desperate :-)
they are happy enough to wait a bit
but in your case, it depends on how new users are created.
You would have to hook in to that process, adding the user to slurm
would be a simple call to run the add user script on the head node
Ben
Hi Ben,
Thanks for the response, we are running the same script in the cron
job in each hour to check user and to add / delete user account.
The problem is when a new user joins the cluster, the user cannot
submit job immediately until the cron job is running to add the user
to the slurm account database.
That's why I've been thinking how to add user to slurm account
database in realtime so the user does not need to wait the cron job.
The other solution is to run cron job even more frequently, but I
don't like it either. The better solution for creating user account is
not polled by cron job, rather than if it can be pushed as soon as the
user is active.
Appreciate your comments.
Kind regards,
- j
On 2/19/15, Ben Polman <[email protected]> wrote:
jupiter wrote on 02/19/15 06:03:
Hi Jupiter,
it depends on how your users are known on the slurm headnode.
We use a script which runs everyday to ensure that only users in a
certain
unix group are allowed to use the cluster.
The script adds and deletes users as needed.
it is short so I include it here in case you can modify it for
your needs
#!/bin/bash
users=`getent group astro | sed -e 's/.*://;s/,/ /g'`
slurm_users=`/usr/local/slurm/bin/sacctmgr show users | grep astro | awk
'{print $1}'`
# echo $slurm_users
for user in $users; do
# echo "#$user#"
if [[ "$slurm_users" =~ $user ]]; then
echo "user $user already in astro account";
else
/usr/local/slurm/bin/sacctmgr -i create user $user
account=astro
defaultaccount=astro;
fi
done
for user in $slurm_users; do
# echo "#$user#"
if [[ "$users" =~ $user ]]; then
echo "user $user in astro group";
else
/usr/local/slurm/bin/sacctmgr -i delete user name=$user
cluster=coma;
fi
done
best regards
Ben Polman
Create user slurm account
Hi,
A user needs to create slurm account before being able to submit
job. I've
been thinking to run a script in slurm
prolog to check if a user account does not exist, create the user
account
in prolog (I think it is running in root,
should have permission to call sacctmgr) . But, will the prolog be
called
if the user does not have a slurm account?
Also, can the sacctmgr be run in non-slurm control node?
Appreciate if you have better solution to create user account without
involving manual intervention.
Thank you.
Kind regards,
- j
--
---------------------------------------------------------------------
Dr. B.J.W. Polman, C&CZ, Radboud University.
Osiris beheerder NWI
Heyendaalseweg 135, 6525 AJ Nijmegen, The Netherlands, Phone:
+31-24-3653360
e-mail: [email protected]
--
=====================================================
Dr. Markus Stöhr
Zentraler Informatikdienst BOKU Wien / TU Wien
Wiedner Hauptstraße 8-10
1040 Wien
Tel. +43-1-58801-420754
Fax +43-1-58801-9420754
Email: [email protected]
=====================================================