I've been investigating SLURM as an option for some systems I work on. While 
testing out some simple job launching, I noticed that SLURM would loose the 
user's primary group if the sbatch/srun command was run with a different group 
as the active one. We do launch some jobs in this manner with our current 
scheduler, which does preserve both the active GID and the primary GID in the 
supplemental GIDs list. Is this the intended behavior?

Below are some examples of what I'm seeing with SLURM 14.11.0. Notice that 
group 1000 disappears in the sleep process.

[prout@login-0 ~]$ cat /proc/$$/status
Name:    bash
Uid:    1000    1000    1000    1000
Gid:    1000    1000    1000    1000
Groups:    10 11 19 20 1000

[prout@login-0 ~]$ newgrp floppy

[prout@login-0 ~]$ cat /proc/$$/status
Name:    bash
Uid:    1000    1000    1000    1000
Gid:    19    19    19    19
Groups:    10 11 19 20 1000

[prout@login-0 ~]$ echo -e '#!/bin/sh\n/bin/sleep 90' | sbatch -o /dev/null

[prout@login-0 ~]$ ssh compute-0

[prout@compute-0 ~]$ ps aux | grep sleep
prout   8025  0.0  0.0 107884   500 ?        S    11:58   0:00 /bin/sleep 90

[prout@compute-0 ~]$ cat /proc/8025/status
Name:    sleep
Uid:    1000    1000    1000    1000
Gid:    19    19    19    19
Groups:    10 11 19 20

Reply via email to