From 9f698afae6e77616b0eaaf363c5e13b316227bc4 Mon Sep 17 00:00:00 2001 From: dahuang Date: Tue, 20 Feb 2024 22:49:13 -0700 Subject: [PATCH] fixup! add check for shared volumes in getVolumeStats Signed-off-by: dahuang --- csi/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csi/node.go b/csi/node.go index 488bd41e2..6deece075 100644 --- a/csi/node.go +++ b/csi/node.go @@ -364,8 +364,8 @@ func (s *OsdCsiServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetV } var attachPathMatch bool + sharedPath := fmt.Sprintf("%s/%s", api.SharedVolExportPrefix, id) for _, attachPath := range vol.AttachPath { - sharedPath := fmt.Sprintf("%s/%s", api.SharedVolExportPrefix, id) if attachPath == path || attachPath == sharedPath { attachPathMatch = true }