mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
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:
parent
95387c3b5e
commit
fb3f7fe202
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user