rbd: remove extra getImageInfo API call

as getImageInfo is already called inside
cloneRbdImageFromSnapshot function right
after creating the clone. remove the extra
API call to get the details again.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-12-20 20:50:04 +05:30 committed by mergify[bot]
parent ff91b7edbd
commit 8c9105f09e

View File

@ -64,17 +64,6 @@ func createRBDClone(
return err return err
} }
err = cloneRbdVol.getImageInfo()
if err != nil {
log.ErrorLog(ctx, "failed to get rbd image: %s details with error: %v", cloneRbdVol, err)
delErr := deleteImage(ctx, cloneRbdVol, cr)
if delErr != nil {
log.ErrorLog(ctx, "failed to delete rbd image: %s with error: %v", cloneRbdVol, delErr)
}
return err
}
return nil return nil
} }