Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update logline to remove "formatted" #1612

Merged
merged 1 commit into from
May 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update logline to remove "formatted"
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
commit c8eaf99adeaa66c33dd960d2eee3afebf2f9be2f
4 changes: 2 additions & 2 deletions pkg/driver/node.go
Original file line number Diff line number Diff line change
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