mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
rbd: add more logging for NodeUnstageVolume
For NodeUnstageVolume its a two step process, first unmount the volume and than unmap the volume. Currently, we are logging only after rbd unmapping is done. sometimes it becomes difficult to debug with above logging whether more time is spent in unmount or unmap. This commits adds one more debug log after unmount is done. with this we can identify where exactly more time is spent by looking at the logs. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
abfe3ed9cb
commit
cbb10fd84d
@ -649,6 +649,8 @@ func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstag
|
||||
util.ExtendedLog(ctx, "failed to unmount targetPath: %s with error: %v", stagingTargetPath, err)
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
util.DebugLog(ctx, "successfully unmounted volume (%s) from staging path (%s)",
|
||||
req.GetVolumeId(), stagingTargetPath)
|
||||
}
|
||||
|
||||
if err = os.Remove(stagingTargetPath); err != nil {
|
||||
@ -687,8 +689,7 @@ func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstag
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
util.DebugLog(ctx, "successfully unmounted volume (%s) from staging path (%s)",
|
||||
req.GetVolumeId(), stagingTargetPath)
|
||||
util.DebugLog(ctx, "successfully unmapped volume (%s)", req.GetVolumeId())
|
||||
|
||||
if err = cleanupRBDImageMetadataStash(stagingParentPath); err != nil {
|
||||
util.ErrorLog(ctx, "failed to cleanup image metadata stash (%v)", err)
|
||||
|
Loading…
Reference in New Issue
Block a user