[slurm-users] Proposed changes to pam_slurm_adopt

Vienne, Jerome Jerome.Vienne at Squarepoint-Capital.com
Tue Jun 12 10:31:49 MDT 2018


As always, I forgot the attached file. :)


From: Vienne, Jerome
Sent: Tuesday, June 12, 2018 12:31 PM
To: 'slurm-users at lists.schedmd.com' <slurm-users at lists.schedmd.com>
Subject: Proposed changes to pam_slurm_adopt

Hi,

While testing pam_slurm_adopt with multiple jobs running on the node with Centos7, I realized that it was failing with error messages like:
Jun 12 11:57:37 server pam_slurm_adopt[86395]: From 192.168.1.48 port 36512 as test1234: unable to determine source job
Jun 12 11:57:37 server pam_slurm_adopt[86395]: Couldn't stat path '/cgroup/memory/slurm/uid_1002/job_104'
Jun 12 11:57:37 server pam_slurm_adopt[86395]: Couldn't stat path '/cgroup/memory/slurm/uid_1002/job_105'
Jun 12 11:57:37 server pam_slurm_adopt[86395]: Couldn't stat path '/cgroup/memory/slurm/uid_1002/job_106'
Jun 12 11:57:37 server pam_slurm_adopt[86395]: Couldn't stat path '/cgroup/memory/slurm/uid_1002/job_107'

As explained in the documentation of the plugin, I knew that I had to change the subsystem in the function _inderterminate_multiple() and change "memory" by "cpuset' for my case.
But I am not a fan of hard-coded things, so I decided to modify the plugin to accept a new option that I called "cgoup_subsystem".

To select the subsystem used by slurm/cgroup, just set the value of subsystem after pam_slurm_adopt.so in /etc/pam.d/sshd, for example:
account    sufficient    pam_slurm_adopt.so subsystem=cpuset

If nothing is set, the default subsystem is memory like before.

After that and with the proposed modifications, everything was working as expected:
Jun 12 11:59:14 server pam_slurm_adopt[86610]: From 192.168.1.48 port 36644 as test1234: unable to determine source job
Jun 12 11:59:14 server pam_slurm_adopt[86610]: action_unknown: Picked job 116
Jun 12 11:59:14 server pam_slurm_adopt[86610]: Process 86610 adopted into job 116

I am attaching the modified version. I believe that it will be useful for some people and might be added to the next version of pam_slurm_adopt.

Thanks,
Jerome Vienne
Confidentiality Note: This e-mail and any attachments are confidential and may be protected by legal privilege. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. We will use any personal information you give to us in accordance with our Privacy Policy which can be found in the Data Protection section on our corporate website www.squarepoint-capital.com. Please note that e-mails may be monitored for regulatory and compliance purposes. Thank you for your cooperation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180612/d2793397/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pam_slurm_adopt.c
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180612/d2793397/attachment-0001.c>


More information about the slurm-users mailing list