Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When deleting the DRPC we may need to adopt the VRG, delete the secondary VRG, wait until the secondary VRG is deleted, delete the primary VRG, and wait until the primary VRG is deleted. This takes 60-90 seconds and 18 reconciles, and creates huge amount of noise in the log. Suppress the noise by introducing the DeleteInProgress error. When the reconcile is successful but it is still in progress, we return a DeleteInProgress error describing the current progression. The top level error handle logs an INFO message and return successful result with RequeueAfter to try again later. With this change we will see multiple logs for the secondary VRG: INFO Deleting DRPC in progress {"reason", "secondary VRG deletion in progress"} ... And finally more logs for the primary VRG: INFO Deleting DRPC in progress {"reason", "primary VRG deletion in progress"} ... Notes: - We logged errors during finalizeDRPC twice; once as INFO log, and once as ERROR with a stacktrace when we return error from the reconcile. Remove the duplicate INFO log. - The linter is not happy about the new nested if. We can avoid this by extracting a helper to handle finalize errors, but I want to keep the change minimal for easy backport. We can improve this later upstream. Signed-off-by: Nir Soffer <[email protected]>
- Loading branch information