Log error message for cephfs

If the loading of cephfs fuse or
the mount.ceph command fails log it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-03-30 13:55:37 +05:30 committed by mergify[bot]
parent ebe5aa00cf
commit 3c3a624d1a

View File

@ -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)
}