From 8019e4d1bc42f37f48207c1f39695a2fa002d239 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 8 Dec 2020 15:01:05 +0100 Subject: [PATCH] rbd: return CSI status-error on resize failure Signed-off-by: Niels de Vos --- internal/rbd/nodeserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rbd/nodeserver.go b/internal/rbd/nodeserver.go index 0c69cf6e5..a78addb50 100644 --- a/internal/rbd/nodeserver.go +++ b/internal/rbd/nodeserver.go @@ -735,7 +735,7 @@ func (ns *NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandV resizer := resizefs.NewResizeFs(diskMounter) ok, err := resizer.Resize(devicePath, volumePath) if !ok { - return nil, fmt.Errorf("rbd: resize failed on path %s, error: %v", req.GetVolumePath(), err) + return nil, status.Errorf(codes.Internal, "rbd: resize failed on path %s, error: %v", req.GetVolumePath(), err) } return &csi.NodeExpandVolumeResponse{}, nil }