rbd: fix return error message

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

View File

@ -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