Skip to content

HDDS-16047. Certificate renewal stops permanently after an unexpected failure - #10915

Merged
adoroszlai merged 1 commit into
apache:masterfrom
ss77892:HDDS-16047
Aug 6, 2026
Merged

HDDS-16047. Certificate renewal stops permanently after an unexpected failure#10915
adoroszlai merged 1 commit into
apache:masterfrom
ss77892:HDDS-16047

Conversation

@ss77892

@ss77892 ss77892 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

… failure

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@yandrey321 yandrey321 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@ss77892

ss77892 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@fapifta can you take a look please.

@fapifta fapifta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thank you for taking care of this one. +1

@adoroszlai
adoroszlai merged commit 5fe740c into apache:master Aug 6, 2026
45 checks passed
@adoroszlai

Copy link
Copy Markdown
Contributor

Thanks @ss77892 for the patch, @fapifta, @yandrey321 for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants