Skip to content

Commit

Permalink
Update logline to remove "formatted"
Browse files Browse the repository at this point in the history
This code path is always hit when mounting, even when the filesystem was already present, and we just mount it.

Reading these log lines for existing PVCs makes my heart miss a beat, when I realize that the volume was indeed not formatted before mounting. If its being formatted, its already present in logs above when on v=4.

Signed-off-by: Odin Ugedal <odin@uged.al>
  • Loading branch information
odinuge committed May 23, 2023
1 parent 771e745 commit c8eaf99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/driver/node.go
Expand Up @@ -238,7 +238,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
}

// FormatAndMount will format only if needed
klog.V(4).InfoS("NodeStageVolume: formatting and mounting with fstype", "source", source, "volumeID", volumeID, "target", target, "fstype", fsType)
klog.V(4).InfoS("NodeStageVolume: staging volume", "source", source, "volumeID", volumeID, "target", target, "fstype", fsType)
formatOptions := []string{}
if len(blockSize) > 0 {
if fsType == FSTypeXfs {
Expand Down Expand Up @@ -267,7 +267,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
return nil, status.Errorf(codes.Internal, "Could not resize volume %q (%q): %v", volumeID, source, err)
}
}
klog.V(4).InfoS("NodeStageVolume: successfully formatted and mounted volume", "source", source, "volumeID", volumeID, "target", target, "fstype", fsType)
klog.V(4).InfoS("NodeStageVolume: successfully staged volume", "source", source, "volumeID", volumeID, "target", target, "fstype", fsType)
return &csi.NodeStageVolumeResponse{}, nil
}

Expand Down

0 comments on commit c8eaf99

Please sign in to comment.