[slurm-dev] Re: Accounting using LDAP ?

2017-09-20 Thread Loris Bennett

Hi Chris,

Christopher Samuel  writes:

> On 20/09/17 15:53, Loris Bennett wrote:
>
>> Having said that, the only scenario I can see being easily automated is
>> one where each user only has one association, namely with their Unix
>> group, and everyone has equal shares.  This is our set up, but as soon
>> as you have, say, users with multiple associations and/or membership in some
>> associations confers more shares automation becomes very difficult.
>
> The user management system we use adds/removes users to accounts (which
> map to projects in our lingo) whenever a user is added/removed to a
> project as well as creating/deleting them.  Users can change their
> default project which changes their default account in Slurm.

Is the user management system homegrown or something more generally
available?

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de


[slurm-dev] Re: Accounting using LDAP ?

2017-09-20 Thread Marcin Stolarek
Christopher,

If you want to use advanced slurm features you'll have to disable slurm
management in Bright. It provides really basic functionalities for those
who would like to start with the cluster very fast. However, when you're
configuration complexity grows, you have to manage slurm directly...

cheers,
Marcin

2017-09-20 9:14 GMT+02:00 Loris Bennett :

>
> Hi Chris,
>
> Christopher Samuel  writes:
>
> > On 20/09/17 15:53, Loris Bennett wrote:
> >
> >> Having said that, the only scenario I can see being easily automated is
> >> one where each user only has one association, namely with their Unix
> >> group, and everyone has equal shares.  This is our set up, but as soon
> >> as you have, say, users with multiple associations and/or membership in
> some
> >> associations confers more shares automation becomes very difficult.
> >
> > The user management system we use adds/removes users to accounts (which
> > map to projects in our lingo) whenever a user is added/removed to a
> > project as well as creating/deleting them.  Users can change their
> > default project which changes their default account in Slurm.
>
> Is the user management system homegrown or something more generally
> available?
>
> Cheers,
>
> Loris
>
> --
> Dr. Loris Bennett (Mr.)
> ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de
>


[slurm-dev] Re: Limiting SSH sessions to cgroups?

2017-09-20 Thread Jacob Chappell
I did not have that option set, thanks :) The SSH session is indeed being
adopted by the running job now (I can login and view this in the
authentication logs). Sorry for all of the questions and hassle, but, I
still have one weird issue. I'm probably missing another setting somewhere.
The cgroup that the SSH session is adopted into does not seem to include
the /dev files. For example, here are 3 outputs of the cgroups (cat
/proc/$PPID/cgroup) from various perspectives.

>From the perspective of a user that is outside of Slurm's control (e.g.
root and such):
11:pids:/user.slice/user-1001.slice
10:cpuset:/<-- no CPU limitations, as expected
9:memory:/user.slice
8:hugetlb:/
7:cpu,cpuacct:/user.slice
6:devices:/user.slice
5:freezer:/
4:net_cls,net_prio:/
3:perf_event:/
2:blkio:/user.slice
1:name=systemd:/user.slice/user-1001.slice/session-1.scope

>From the perspective of the running job:
11:pids:/user.slice/user-1001.slice
10:cpuset:/slurm/uid_1/job_47/step_batch
9:memory:/user.slice
8:hugetlb:/
7:cpu,cpuacct:/user.slice
6:devices:/slurm/uid_1/job_47/step_batch<-- note the devices are
limited
5:freezer:/slurm/uid_1/job_47
4:net_cls,net_prio:/
3:perf_event:/
2:blkio:/user.slice
1:name=systemd:/user.slice/user-1001.slice/session-1.scope

>From the perspective of the adopted SSH session:
11:pids:/user.slice/user-1.slice
10:cpuset:/slurm/uid_1/job_47/step_extern<--- cpus are limited as
expected
9:memory:/user.slice
8:hugetlb:/
7:cpu,cpuacct:/user.slice
6:devices:/user.slice<--- devices are not limited :(
5:freezer:/slurm/uid_1/job_47/step_extern
4:net_cls,net_prio:/
3:perf_event:/
2:blkio:/user.slice
1:name=systemd:/user.slice/user-1.slice/session-8.scope

Any ideas on this one?

Thanks,
Jacob Chappell

On Tue, Sep 19, 2017 at 8:00 PM, Christopher Samuel 
wrote:

>
> On 20/09/17 06:39, Jacob Chappell wrote:
>
> > Thanks everyone who has replied. I am trying to get pam_slurm_adopt.so
> > implemented. Does it work with batch jobs?
>
> It does indeed, we use it as well.
>
> Do you have:
>
> PrologFlags=contain
>
> set?  From slurm.conf:
>
>
>   Contain At job allocation time, use the ProcTrack plugin to
>   create a job  container  on  all  allocated compute
>   nodes. This container may be used for user processes
>   not launched under Slurm control, for example the PAM
>   module may place processes launch through a direct
>   user  login into this container. Setting the Contain
>   implicitly sets the Alloc flag.
>
>
> --
>  Christopher SamuelSenior Systems Administrator
>  Melbourne Bioinformatics - The University of Melbourne
>  Email: sam...@unimelb.edu.au Phone: +61 (0)3 903 55545
>


[slurm-dev] Re: Accounting using LDAP ?

2017-09-20 Thread Christopher Samuel

On 20/09/17 17:14, Loris Bennett wrote:

> Is the user management system homegrown or something more generally
> available?

Both, it was started as a project at $JOB-1 and open-sourced.

http://karaage.readthedocs.org/

The current main developer no longer works in HPC (as $JOB-1 folded
years after I left for here) but he's still looking after this as he's
helping the university out in his spare time.  He's currently moving
from deploying it via Debian packages to using Docker.

We have our own custom module for karaage for project creation as we
needed a lot more information from applicants than what it captures by
default, but that's the nice thing, it is modular.

Also includes Shibboleth support.

All the best!
Chris
-- 
 Christopher SamuelSenior Systems Administrator
 Melbourne Bioinformatics - The University of Melbourne
 Email: sam...@unimelb.edu.au Phone: +61 (0)3 903 55545