cleanup: return error type in rbdVolume.checkCloneImage()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-12-08 14:22:56 +01:00 committed by mergify[bot]
parent 37471c7a5f
commit cc3f146ad1

View File

@ -100,7 +100,7 @@ func (rv *rbdVolume) checkCloneImage(ctx context.Context, parentVol *rbdVolume)
err = rv.cloneRbdImageFromSnapshot(ctx, snap) err = rv.cloneRbdImageFromSnapshot(ctx, snap)
if err != nil { if err != nil {
util.ErrorLog(ctx, "failed to clone rbd image %s from snapshot %s: %v", rv.RbdImageName, snap.RbdSnapName, err) 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: %v", rv.RbdImageName, snap.RbdSnapName, err) err = fmt.Errorf("failed to clone rbd image %s from snapshot %s: %w", rv.RbdImageName, snap.RbdSnapName, err)
return false, err return false, err
} }
err = tempClone.deleteSnapshot(ctx, snap) err = tempClone.deleteSnapshot(ctx, snap)