RSE-Cambridge / data-acc

Data Accelerator: Creates a burst buffer from generic hardware and integrates it with Slurm https://www.hpc.cam.ac.uk/research/data-acc http://www.stackhpc.com
https://rse-cambridge.github.io/data-acc
Apache License 2.0
17 stars 11 forks source link

Persistent buffers can be given the wrong group permissions #76

Open jsteel44 opened 5 years ago

jsteel44 commented 5 years ago

It looks like a gid is assumed to be the same as a uid and so my persistent buffers have group rwx given to the wrong group. This could also lead to the chown failing if the gid doesn't exist.

Per-job buffers are unaffected. You can see below the gid is, and should be different to the uid but it incorrectly matches on the persistent buffer.

Example user:

$ id
uid=17121 gid=17124

Buffers:

/dac/2307_job:
total 4
drwxrwx--- 2 17121 17124 4096 Aug  7 12:19 global

/dac/2307_persistent_jsteel:
total 4
drwxrwx--- 2 17121 17121 4096 Aug  7 10:17 global
JohnGarbutt commented 5 years ago

Hmm, I thought this one had been fixed already... https://github.com/RSE-Cambridge/data-acc/commit/7b66bbf669137d5d97e4c46b985defab7facdcf9

Need to double check we populate Volume.Group with the correct value.

jsteel44 commented 5 years ago

Yes the group chown looks like it is happening but the group is being populated incorrectly. I'll leave that one with you but in case it's any help, here's a stab in the dark:

internal/pkg/dacctl/actions/actions.go: request.Group = request.User

JohnGarbutt commented 5 years ago

After further discussion, we actually need to change how we do the chown etc, it needs to happen on buffer create, not on buffer mount.

jsteel44 commented 5 years ago

It looks like a persistent buffer is created with 700 permissions now and group is set to root (at least on the global directory). If that is intended that works for me.

JohnGarbutt commented 5 years ago

Hmm, not sure about the root group. I was expecting it to be what Slurm specified.