mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 14:50:24 +00:00
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>
(cherry picked from commit 3c3a624d1a
)
This commit is contained in:
parent
10866f5f82
commit
45229d6a40
@ -147,10 +147,12 @@ func loadAvailableMounters(conf *util.Config) error {
|
|||||||
kernelMounterProbe := exec.Command("mount.ceph")
|
kernelMounterProbe := exec.Command("mount.ceph")
|
||||||
|
|
||||||
err := kernelMounterProbe.Run()
|
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
|
// fetch the current running kernel info
|
||||||
utsname := unix.Utsname{}
|
utsname := unix.Utsname{}
|
||||||
err := unix.Uname(&utsname)
|
err = unix.Uname(&utsname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -164,8 +166,11 @@ func loadAvailableMounters(conf *util.Config) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if fuseMounterProbe.Run() == nil {
|
err = fuseMounterProbe.Run()
|
||||||
klog.Infof("loaded mounter: %s", volumeMounterFuse)
|
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)
|
availableMounters = append(availableMounters, volumeMounterFuse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user