Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,9 @@ public synchronized void startCertificateRenewerService() {
this.executorService.scheduleAtFixedRate(
new CertificateRenewerService(false, () -> {
}),
timeBeforeGracePeriod, interval, TimeUnit.MILLISECONDS);
// The Java mills resolution is 1ms, add 1ms to avoid task scheduled
// ahead of time.
timeBeforeGracePeriod + 1, interval, TimeUnit.MILLISECONDS);
getLogger().info("CertificateRenewerService for {} is started with " +
"first delay {} ms and interval {} ms.", component,
timeBeforeGracePeriod, interval);
Expand Down Expand Up @@ -1376,6 +1378,9 @@ public void run() {
Duration timeLeft = timeBeforeExpiryGracePeriod(currentCert);

if (!forceRenewal && !timeLeft.isZero()) {
getLogger().info("Current certificate {} hasn't entered the " +
"renew grace period. Remaining period is {}. ",
currentCert.getSerialNumber().toString(), timeLeft);
return;
}
String newCertId;
Expand Down