From 5a079122f47efe727746b6e947d2599a94a9364a Mon Sep 17 00:00:00 2001 From: Liang Zheng Date: Fri, 28 Apr 2023 17:20:33 +0800 Subject: [PATCH] rbd: can exit early if image-meta.json does not exist Signed-off-by: Liang Zheng --- internal/rbd/nodeserver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/rbd/nodeserver.go b/internal/rbd/nodeserver.go index 4f7e3d70d..fa771b995 100644 --- a/internal/rbd/nodeserver.go +++ b/internal/rbd/nodeserver.go @@ -1127,6 +1127,8 @@ func (ns *NodeServer) NodeExpandVolume( imgInfo, err := lookupRBDImageMetadataStash(volumePath) if err != nil { log.ErrorLog(ctx, "failed to find image metadata: %v", err) + + return nil, status.Error(codes.Internal, err.Error()) } devicePath, found := findDeviceMappingImage( ctx,