diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index 7377cfcf0..e2fc55800 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -719,6 +719,13 @@ func (rv *rbdVolume) checkImageChainHasFeature(ctx context.Context, feature uint } err = vol.getImageInfo() if err != nil { + // call to getImageInfo returns the parent name even if the parent + // is in the trash, when we try to open the parent image to get its + // information it fails because it is already in trash. We should + // treat error as nil if the parent is not found. + if errors.Is(err, ErrImageNotFound) { + return false, nil + } util.ErrorLog(ctx, "failed to get image info for %s: %s", vol, err) return false, err }