Skip to content

Commit

Permalink
PWX-35292: Reduce log level for chatty log Volume was deleted
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Griffiths <[email protected]>
  • Loading branch information
Grant Griffiths committed Dec 6, 2023
1 parent d4f65c9 commit 1434a8a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions csi/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func (s *OsdCsiServer) NodeGetInfo(
// target path on the node.
//
// TODO: Support READ ONLY Mounts
//
func (s *OsdCsiServer) NodePublishVolume(
ctx context.Context,
req *csi.NodePublishVolumeRequest,
Expand Down Expand Up @@ -236,14 +235,14 @@ func (s *OsdCsiServer) NodeUnpublishVolume(
vols, err := s.driver.Enumerate(&api.VolumeLocator{VolumeIds: []string{req.GetVolumeId()}}, nil)
if err != nil || len(vols) < 1 {
if err == kvdb.ErrNotFound {
clogger.WithContext(ctx).Infof("Volume %s was deleted or cannot be found: %s", req.GetVolumeId(), err.Error())
clogger.WithContext(ctx).Tracef("Volume %s was deleted or cannot be found: %s", req.GetVolumeId(), err.Error())
return &csi.NodeUnpublishVolumeResponse{}, nil
} else if err != nil {
return nil, status.Errorf(codes.NotFound, "Volume id %s not found: %s",
req.GetVolumeId(),
err.Error())
} else {
clogger.WithContext(ctx).Infof("Volume %s was deleted or cannot be found", req.GetVolumeId())
clogger.WithContext(ctx).Tracef("Volume %s was deleted or cannot be found", req.GetVolumeId())
return &csi.NodeUnpublishVolumeResponse{}, nil
}
}
Expand Down

0 comments on commit 1434a8a

Please sign in to comment.