Skip to content

Commit 1bd5bb0

Browse files
authored
Merge pull request #329 from andyzhangx/chmod-logging
cleanup: refine mount logging
2 parents 87b4d17 + 56cc263 commit 1bd5bb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/nfs/nodeserver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,15 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
120120
return nil, status.Error(codes.Internal, err.Error())
121121
}
122122

123-
klog.V(2).Infof("volumeID(%v): mount targetPath(%s) with permissions(0%o)", volumeID, targetPath, mountPermissions)
124123
if performChmodOp {
124+
klog.V(2).Infof("volumeID(%v): chmod targetPath(%s) with permissions(0%o)", volumeID, targetPath, mountPermissions)
125125
if err := os.Chmod(targetPath, os.FileMode(mountPermissions)); err != nil {
126126
return nil, status.Error(codes.Internal, err.Error())
127127
}
128128
} else {
129129
klog.V(2).Infof("skip chmod on targetPath(%s) since mountPermissions is set as 0", targetPath)
130130
}
131+
klog.V(2).Infof("volume(%s) mount %s on %s succeeded", volumeID, source, targetPath)
131132
return &csi.NodePublishVolumeResponse{}, nil
132133
}
133134

0 commit comments

Comments
 (0)