mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rbd: add support to create clone in different pool
added support to create image in different pool. if the snapshot/rbd image exists in one pool we can create a clone the clone of the rbd image to a different pool. Co-authored-by: Madhu Rajanna <madhupr007@gmail.com> Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
@ -101,7 +101,7 @@ func (rv *rbdVolume) checkCloneImage(ctx context.Context, parentVol *rbdVolume)
|
||||
// need to check for flatten here.
|
||||
// as the snap exists,create clone image and delete temporary snapshot
|
||||
// and add task to flatten temporary cloned image
|
||||
err = rv.cloneRbdImageFromSnapshot(ctx, snap)
|
||||
err = rv.cloneRbdImageFromSnapshot(ctx, snap, parentVol)
|
||||
if err != nil {
|
||||
util.ErrorLog(ctx, "failed to clone rbd image %s from snapshot %s: %v", rv.RbdImageName, snap.RbdSnapName, err)
|
||||
err = fmt.Errorf("failed to clone rbd image %s from snapshot %s: %w", rv.RbdImageName, snap.RbdSnapName, err)
|
||||
|
Reference in New Issue
Block a user