csi-addons / volume-replication-operator

Apache License 2.0
16 stars 23 forks source link

replication: requeue if any error in secondary state #124

Closed Madhu-1 closed 2 years ago

Madhu-1 commented 2 years ago

if the resync failed (marking the image as secondary) failed, requeue the request for 15 seconds as this can also increases the recovery time.

address https://github.com/csi-addons/volume-replication-operator/pull/123#discussion_r735589234

Signed-off-by: Madhu Rajanna madhupr007@gmail.com

Madhu-1 commented 2 years ago

logs to confirm the requeue in case of error.

{"level":"info","timestamp":"2021-10-25T13:59:17.226Z","logger":"controllers.VolumeReplication","caller":"controller/controller.go:298","msg":"volume handle","Request.Name":"pvc-volumereplication-restore","Request.Namespace":"default","VolumeHandleName":"0001-0009-rook-ceph-0000000000000002-d033a6ae-3551-11ec-8181-0242ac110005"}
{"level":"error","timestamp":"2021-10-25T13:59:17.477Z","logger":"controllers.VolumeReplication","caller":"controllers/volumereplication_controller.go:241","msg":"failed to resync volume","Request.Name":"pvc-volumereplication-restore","Request.Namespace":"default","error":"rpc error: code = Internal desc = not resyncing. image is in unknown state"}
{"level":"error","timestamp":"2021-10-25T13:59:17.477Z","logger":"controllers.VolumeReplication","caller":"controller/controller.go:298","msg":"failed to Replicate","Request.Name":"pvc-volumereplication-restore","Request.Namespace":"default","ReplicationState":"secondary","error":"rpc error: code = Internal desc = not resyncing. image is in unknown state"}

{"level":"info","timestamp":"2021-10-25T13:59:32.504Z","logger":"controllers.VolumeReplication","caller":"controller/controller.go:298","msg":"volume handle","Request.Name":"pvc-volumereplication-restore","Request.Namespace":"default","VolumeHandleName":"0001-0009-rook-ceph-0000000000000002-d033a6ae-3551-11ec-8181-0242ac110005"}
{"level":"error","timestamp":"2021-10-25T13:59:32.632Z","logger":"controllers.VolumeReplication","caller":"controllers/volumereplication_controller.go:241","msg":"failed to resync volume","Request.Name":"pvc-volumereplication-restore","Request.Namespace":"default","error":"rpc error: code = Internal desc = not resyncing. image is in unknown state"}
{"level":"error","timestamp":"2021-10-25T13:59:32.632Z","logger":"controllers.VolumeReplication","caller":"controller/controller.go:298","msg":"failed to Replicate","Request.Name":"pvc-volumereplication-restore","Request.Namespace":"default","ReplicationState":"secondary","error":"rpc error: code = Internal desc = not resyncing. image is in unknown state"}