diff --git a/pkg/cephfs/volumemounter.go b/pkg/cephfs/volumemounter.go index 35bb7a842..0854004f9 100644 --- a/pkg/cephfs/volumemounter.go +++ b/pkg/cephfs/volumemounter.go @@ -147,10 +147,12 @@ func loadAvailableMounters(conf *util.Config) error { kernelMounterProbe := exec.Command("mount.ceph") err := kernelMounterProbe.Run() - if err == nil { + if err != nil { + klog.Errorf("failed to run mount.ceph %v", err) + } else { // fetch the current running kernel info utsname := unix.Utsname{} - err := unix.Uname(&utsname) + err = unix.Uname(&utsname) if err != nil { return err } @@ -164,7 +166,10 @@ func loadAvailableMounters(conf *util.Config) error { } } - if fuseMounterProbe.Run() == nil { + err = fuseMounterProbe.Run() + if err != nil { + klog.Errorf("failed to run ceph-fuse %v", err) + } else { klog.V(1).Infof("loaded mounter: %s", volumeMounterFuse) availableMounters = append(availableMounters, volumeMounterFuse) }