mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cephfs: Support mount option on nodeplugin
add mount options on nodeplugin side Signed-off-by: takeaki-matsumoto <takeaki.matsumoto@linecorp.com>
This commit is contained in:
committed by
mergify[bot]
parent
ceb88d6498
commit
1025871021
@ -43,7 +43,9 @@ type NodeServer struct {
|
||||
*csicommon.DefaultNodeServer
|
||||
// A map storing all volumes with ongoing operations so that additional operations
|
||||
// for that same volume (as defined by VolumeID) return an Aborted error
|
||||
VolumeLocks *util.VolumeLocks
|
||||
VolumeLocks *util.VolumeLocks
|
||||
kernelMountOptions string
|
||||
fuseMountOptions string
|
||||
}
|
||||
|
||||
func getCredentialsForVolume(
|
||||
@ -225,7 +227,7 @@ func (ns *NodeServer) NodeStageVolume(
|
||||
return &csi.NodeStageVolumeResponse{}, nil
|
||||
}
|
||||
|
||||
func (*NodeServer) mount(
|
||||
func (ns *NodeServer) mount(
|
||||
ctx context.Context,
|
||||
mnt mounter.VolumeMounter,
|
||||
volOptions *store.VolumeOptions,
|
||||
@ -244,6 +246,13 @@ func (*NodeServer) mount(
|
||||
|
||||
log.DebugLog(ctx, "cephfs: mounting volume %s with %s", volID, mnt.Name())
|
||||
|
||||
switch mnt.(type) {
|
||||
case *mounter.FuseMounter:
|
||||
volOptions.FuseMountOptions = util.MountOptionsAdd(volOptions.FuseMountOptions, ns.fuseMountOptions)
|
||||
case *mounter.KernelMounter:
|
||||
volOptions.KernelMountOptions = util.MountOptionsAdd(volOptions.KernelMountOptions, ns.kernelMountOptions)
|
||||
}
|
||||
|
||||
const readOnly = "ro"
|
||||
|
||||
if volCap.AccessMode.Mode == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY ||
|
||||
|
Reference in New Issue
Block a user