mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 06:40:23 +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")
|
||||
|
||||
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,8 +166,11 @@ func loadAvailableMounters(conf *util.Config) error {
|
||||
}
|
||||
}
|
||||
|
||||
if fuseMounterProbe.Run() == nil {
|
||||
klog.Infof("loaded mounter: %s", volumeMounterFuse)
|
||||
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