From 032901b8d0538891b1a4966914cefa3b67e2d91c Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 11 Aug 2020 17:40:24 +0530 Subject: [PATCH] cephfs: replace Errorf with ErrorLog in nodeStageVolume replace Errorf with ErrorLog in nodeStageVolume for context based logging. Signed-off-by: Madhu Rajanna --- internal/cephfs/nodeserver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cephfs/nodeserver.go b/internal/cephfs/nodeserver.go index 0294aa5aa..af6eb4b03 100644 --- a/internal/cephfs/nodeserver.go +++ b/internal/cephfs/nodeserver.go @@ -82,7 +82,7 @@ func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol volID := volumeID(req.GetVolumeId()) if acquired := ns.VolumeLocks.TryAcquire(req.GetVolumeId()); !acquired { - klog.Errorf(util.Log(ctx, util.VolumeOperationAlreadyExistsFmt), volID) + util.ErrorLog(ctx, util.VolumeOperationAlreadyExistsFmt, volID) return nil, status.Errorf(codes.Aborted, util.VolumeOperationAlreadyExistsFmt, req.GetVolumeId()) } defer ns.VolumeLocks.Release(req.GetVolumeId()) @@ -114,7 +114,7 @@ func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol isMnt, err := util.IsMountPoint(stagingTargetPath) if err != nil { - klog.Errorf(util.Log(ctx, "stat failed: %v"), err) + util.ErrorLog(ctx, "stat failed: %v", err) return nil, status.Error(codes.Internal, err.Error()) }