From ff91b7edbd91f65c2b369b496f04c22b910b22b5 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 20 Dec 2021 20:48:35 +0530 Subject: [PATCH] rbd: get image details after creating clone after creating the clone get the current image details like size, creationTime, imageFeatures etc from the ceph cluster. Signed-off-by: Madhu Rajanna --- internal/rbd/rbd_util.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index b91fb1107..94571ea6f 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -1503,6 +1503,12 @@ func (rv *rbdVolume) cloneRbdImageFromSnapshot( } } + // get image latest information + err = rv.getImageInfo() + if err != nil { + return fmt.Errorf("failed to get image info of %s: %w", rv, err) + } + // Success! Do not delete the cloned image now :) deleteClone = false