rbd: can exit early if image-meta.json does not exist

Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
This commit is contained in:
Liang Zheng 2023-04-28 17:20:33 +08:00 committed by mergify[bot]
parent 7d4295b298
commit 5a079122f4

View File

@ -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,