mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
cephfs: replace Warningf with WarningLog in unmountVolume
replace Errorf with ErrorLog in unmountVolume for context based logging. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
3fe3d25dda
commit
f566b0fc2d
@ -28,8 +28,6 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/ceph/ceph-csi/internal/util"
|
"github.com/ceph/ceph-csi/internal/util"
|
||||||
|
|
||||||
klog "k8s.io/klog/v2"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -276,10 +274,10 @@ func unmountVolume(ctx context.Context, mountPoint string) error {
|
|||||||
if ok {
|
if ok {
|
||||||
p, err := os.FindProcess(pid)
|
p, err := os.FindProcess(pid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Warningf(util.Log(ctx, "failed to find process %d: %v"), pid, err)
|
util.WarningLog(ctx, "failed to find process %d: %v", pid, err)
|
||||||
} else {
|
} else {
|
||||||
if _, err = p.Wait(); err != nil {
|
if _, err = p.Wait(); err != nil {
|
||||||
klog.Warningf(util.Log(ctx, "%d is not a child process: %v"), pid, err)
|
util.WarningLog(ctx, "%d is not a child process: %v", pid, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user