From 6baca643f91ba4e39d46d0ac6452daaf17f85e96 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Tue, 22 Oct 2024 15:54:13 +0100 Subject: [PATCH] returned CapacityBytes after NodeExpansion --- pkg/spdk/nodeserver.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/spdk/nodeserver.go b/pkg/spdk/nodeserver.go index a8b5588..569a040 100644 --- a/pkg/spdk/nodeserver.go +++ b/pkg/spdk/nodeserver.go @@ -302,6 +302,7 @@ func (ns *nodeServer) NodeExpandVolume(_ context.Context, req *csi.NodeExpandVol volumeID := req.GetVolumeId() volumeMountPath := req.GetVolumePath() + updatedSize := req.GetCapacityRange().GetRequiredBytes() stagingParentPath := req.GetStagingTargetPath() volumeContext, err := util.LookupVolumeContext(stagingParentPath) @@ -332,7 +333,7 @@ func (ns *nodeServer) NodeExpandVolume(_ context.Context, req *csi.NodeExpandVol } } - return &csi.NodeExpandVolumeResponse{}, nil + return &csi.NodeExpandVolumeResponse{CapacityBytes: updatedSize}, nil } // must be idempotent