From b63b0bf18d26534078d02232a311ea7860be9421 Mon Sep 17 00:00:00 2001 From: Yug Date: Wed, 17 Mar 2021 16:25:49 +0530 Subject: [PATCH] rbd: retrieve parent pool name of child image when clones are created in different pool,we need to retrieve the parent pool to get the information of the parent image. Co-authored-by: Madhu Rajanna Signed-off-by: Yug --- internal/rbd/rbd_util.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index 1d42a0bd9..4af8da5dd 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -114,8 +114,10 @@ type rbdVolume struct { Topology map[string]string // DataPool is where the data for images in `Pool` are stored, this is used as the `--data-pool` // argument when the pool is created, and is not used anywhere else - DataPool string - ParentName string + DataPool string + ParentName string + // Parent Pool is the pool that contains the parent image. + ParentPool string imageFeatureSet librbd.FeatureSet AdminID string `json:"adminId"` UserID string `json:"userId"` @@ -1189,6 +1191,7 @@ func (rv *rbdVolume) getImageInfo() error { } } else { rv.ParentName = parentInfo.Image.ImageName + rv.ParentPool = parentInfo.Image.PoolName } // Get image creation time tm, err := image.GetCreateTimestamp()