From 45c8d178b2e0294f206f7c68d32a190e348e3829 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Wed, 19 Aug 2020 14:52:26 +0530 Subject: [PATCH] rbd: fix return error message incase of flattening error return the flatten error. Signed-off-by: Madhu Rajanna (cherry picked from commit a7b65087af5ba98e3603073c09e21b1c6072b053) --- internal/rbd/clone.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rbd/clone.go b/internal/rbd/clone.go index 91c05c6fa..d4a266796 100644 --- a/internal/rbd/clone.go +++ b/internal/rbd/clone.go @@ -195,7 +195,7 @@ func (rv *rbdVolume) createCloneFromImage(ctx context.Context, parentVol *rbdVol // flatten clone errFlatten = tempClone.flattenRbdImage(ctx, rv.conn.Creds, false, rbdHardMaxCloneDepth, rbdSoftMaxCloneDepth) if errFlatten != nil { - return err + return errFlatten } // create snap of temp clone from temporary cloned image // create final clone