rbd: remove todo for image not found

Incase of resync the image will get deleted, gets
recreated and its a a time consuming operation.
It makes sense to return aborted error instead
of not found as we have omap data only the image
is missing in rbd pool.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-03-18 13:00:57 +05:30 committed by mergify[bot]
parent 95387c3b5e
commit fb3f7fe202

View File

@ -405,11 +405,10 @@ func (rs *ReplicationServer) ResyncVolume(ctx context.Context,
mirroringInfo, err := rbdVol.getImageMirroringInfo()
if err != nil {
// TODO: check if the image is not found return valid error message
// in case of Resync the image will get deleted and gets recreated and
// it takes time for this operation
// it takes time for this operation.
util.ErrorLog(ctx, err.Error())
return nil, status.Error(codes.Internal, err.Error())
return nil, status.Error(codes.Aborted, err.Error())
}
if mirroringInfo.State != librbd.MirrorImageEnabled {