From 56cc263e90799011ed279ab0b10e6497940eb045 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Thu, 5 May 2022 11:44:36 +0000 Subject: [PATCH] cleanup: refine mount logging --- pkg/nfs/nodeserver.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/nfs/nodeserver.go b/pkg/nfs/nodeserver.go index 31a59a79..a9294280 100644 --- a/pkg/nfs/nodeserver.go +++ b/pkg/nfs/nodeserver.go @@ -120,14 +120,15 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis return nil, status.Error(codes.Internal, err.Error()) } - klog.V(2).Infof("volumeID(%v): mount targetPath(%s) with permissions(0%o)", volumeID, targetPath, mountPermissions) if performChmodOp { + klog.V(2).Infof("volumeID(%v): chmod targetPath(%s) with permissions(0%o)", volumeID, targetPath, mountPermissions) if err := os.Chmod(targetPath, os.FileMode(mountPermissions)); err != nil { return nil, status.Error(codes.Internal, err.Error()) } } else { klog.V(2).Infof("skip chmod on targetPath(%s) since mountPermissions is set as 0", targetPath) } + klog.V(2).Infof("volume(%s) mount %s on %s succeeded", volumeID, source, targetPath) return &csi.NodePublishVolumeResponse{}, nil }