mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +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>
This commit is contained in:
parent
ebe5aa00cf
commit
3c3a624d1a
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user