HDDS-16047. Certificate renewal stops permanently after an unexpected failure - #10915
Merged
Conversation
… failure Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@fapifta can you take a look please. |
fapifta
approved these changes
Aug 5, 2026
fapifta
left a comment
Contributor
There was a problem hiding this comment.
Nice catch, thank you for taking care of this one. +1
Contributor
|
Thanks @ss77892 for the patch, @fapifta, @yandrey321 for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
HDDS-16047. Certificate renewal stops permanently after an unexpected failure
CertificateRenewerService is submitted with scheduleAtFixedRate. If the task throws an unchecked exception, the executor cancels every further execution, and the exception is only stored in a Future that nobody inspects, so nothing is logged. The component then never renews its certificate again. Recovery needs a restart, and by then there is no evidence of what stopped the renewal.
The renewal body is now wrapped so an unchecked failure is logged and the schedule is kept. Failures raised by the renewal itself are already reported as CertificateException and handled; the paths that can still throw unchecked sit outside that catch block: the certificate id save callback supplied by the service, the certificate reload, the backup directory cleanup, and the notification receivers.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16047
How was this patch tested?
Adds a unit test that drives the renewer task with a renewal that throws an unchecked exception, and asserts the task contains it. The test invokes the task directly rather than waiting on the scheduler, so it stays deterministic