mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cephfs: do not run modprobe
if support is compiled into the kernel
By reading the contents of /proc/filesystems, and checking if "ceph" is included there, running "modprobe ceph" can be skipped. Fixes: #4376 Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
b79dc5df5a
commit
ab87045afb
@ -77,7 +77,7 @@ func Test_setMountOptions(t *testing.T) {
|
||||
{
|
||||
name: "KernelMountOptions set in cluster-1 config and not set in CLI",
|
||||
ns: &NodeServer{},
|
||||
mnt: mounter.VolumeMounter(&mounter.KernelMounter{}),
|
||||
mnt: mounter.VolumeMounter(mounter.NewKernelMounter()),
|
||||
volOptions: &store.VolumeOptions{
|
||||
ClusterID: "cluster-1",
|
||||
},
|
||||
@ -97,7 +97,7 @@ func Test_setMountOptions(t *testing.T) {
|
||||
ns: &NodeServer{
|
||||
kernelMountOptions: cliKernelMountOptions,
|
||||
},
|
||||
mnt: mounter.VolumeMounter(&mounter.KernelMounter{}),
|
||||
mnt: mounter.VolumeMounter(mounter.NewKernelMounter()),
|
||||
volOptions: &store.VolumeOptions{
|
||||
ClusterID: "cluster-1",
|
||||
},
|
||||
@ -119,7 +119,7 @@ func Test_setMountOptions(t *testing.T) {
|
||||
ns: &NodeServer{
|
||||
kernelMountOptions: cliKernelMountOptions,
|
||||
},
|
||||
mnt: mounter.VolumeMounter(&mounter.KernelMounter{}),
|
||||
mnt: mounter.VolumeMounter(mounter.NewKernelMounter()),
|
||||
volOptions: &store.VolumeOptions{
|
||||
ClusterID: "cluster-2",
|
||||
},
|
||||
@ -162,7 +162,7 @@ func Test_setMountOptions(t *testing.T) {
|
||||
if !strings.Contains(tc.volOptions.FuseMountOptions, tc.want) {
|
||||
t.Errorf("Set FuseMountOptions = %v Required FuseMountOptions = %v", tc.volOptions.FuseMountOptions, tc.want)
|
||||
}
|
||||
case *mounter.KernelMounter:
|
||||
case mounter.KernelMounter:
|
||||
if !strings.Contains(tc.volOptions.KernelMountOptions, tc.want) {
|
||||
t.Errorf("Set KernelMountOptions = %v Required KernelMountOptions = %v", tc.volOptions.KernelMountOptions, tc.want)
|
||||
}
|
||||
|
Reference in New Issue
Block a user