rbd: fix return error message

incase of flattening error return the
flatten error.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a7b65087af)
This commit is contained in:
Madhu Rajanna 2020-08-19 14:52:26 +05:30 committed by mergify[bot]
parent 8ab04d4160
commit 45c8d178b2

View File

@ -195,7 +195,7 @@ func (rv *rbdVolume) createCloneFromImage(ctx context.Context, parentVol *rbdVol
// flatten clone // flatten clone
errFlatten = tempClone.flattenRbdImage(ctx, rv.conn.Creds, false, rbdHardMaxCloneDepth, rbdSoftMaxCloneDepth) errFlatten = tempClone.flattenRbdImage(ctx, rv.conn.Creds, false, rbdHardMaxCloneDepth, rbdSoftMaxCloneDepth)
if errFlatten != nil { if errFlatten != nil {
return err return errFlatten
} }
// create snap of temp clone from temporary cloned image // create snap of temp clone from temporary cloned image
// create final clone // create final clone