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:
Madhu Rajanna 2020-08-11 17:59:51 +05:30 committed by mergify[bot]
parent 3fe3d25dda
commit f566b0fc2d

View File

@ -28,8 +28,6 @@ import (
"sync"
"github.com/ceph/ceph-csi/internal/util"
klog "k8s.io/klog/v2"
)
const (
@ -276,10 +274,10 @@ func unmountVolume(ctx context.Context, mountPoint string) error {
if ok {
p, err := os.FindProcess(pid)
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 {
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)
}
}
}