mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
cephfs: go with default permissions while creating subvolumes
While creating subvolumes, CephFS driver set the mode to `777` and pass it along to go ceph apis which cause the subvolume permission to be on 777, however if we create a subvolume directly in the ceph cluster, the default permission bits are set which is 755 for the subvolume. This commit try to stick to the default behaviour even while creating the subvolume. This also means that we can work with fsgrouppolicy set to `File` in csiDriver object which is also addressed in this commit. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
4b709310e2
commit
1856647506
@ -9,3 +9,4 @@ metadata:
|
||||
spec:
|
||||
attachRequired: false
|
||||
podInfoOnMount: false
|
||||
fsGroupPolicy: File
|
||||
|
@ -8,3 +8,4 @@ metadata:
|
||||
spec:
|
||||
attachRequired: false
|
||||
podInfoOnMount: false
|
||||
fsGroupPolicy: File
|
||||
|
@ -39,12 +39,6 @@ import (
|
||||
// taken through this additional cluster information.
|
||||
var clusterAdditionalInfo = make(map[string]*localClusterState)
|
||||
|
||||
const (
|
||||
// modeAllRWX can be used for setting permissions to Read-Write-eXecute
|
||||
// for User, Group and Other.
|
||||
modeAllRWX = 0o777
|
||||
)
|
||||
|
||||
// Subvolume holds subvolume information. This includes only the needed members
|
||||
// from fsAdmin.SubVolumeInfo.
|
||||
type Subvolume struct {
|
||||
@ -231,7 +225,6 @@ func (s *subVolumeClient) CreateVolume(ctx context.Context) error {
|
||||
|
||||
opts := fsAdmin.SubVolumeOptions{
|
||||
Size: fsAdmin.ByteCount(s.Size),
|
||||
Mode: modeAllRWX,
|
||||
}
|
||||
if s.Pool != "" {
|
||||
opts.PoolLayout = s.Pool
|
||||
|
Loading…
Reference in New Issue
Block a user