| 19 Feb 2025 |
hexa | I think I set it to 23h to not interact with the timer | 16:45:24 |
hexa | but to cover most of the time when it would not run | 16:45:34 |
emily | I don't see how that works with our setup unless we can get lego renew to also wait for non-ARI certificates | 16:45:37 |
hexa | I think infinite could work, but infinite would then probably be something like 30 days? 90 days? | 16:45:56 |
emily | does --ari-wait-to-renew-duration force renewal when the timer expires? or does it just exit without renewing if the wait is further than that? | 16:45:59 |
hexa | max cert duration | 16:46:04 |
hexa | * max remaining cert duration | 16:46:07 |
hexa | ARI is a way to skip the age check on the cert | 16:46:22 |
hexa | when ARI then renew, else normal proceedings | 16:46:39 |
emily | are you sure?
--ari-wait-to-renew-duration value The maximum duration you're willing to sleep for a renewal time returned by the renewalInfo endpoint.
| 16:46:23 |
emily | seems like not that | 16:46:24 |
emily | I do know how ARI works :) | 16:46:32 |
hexa | I'm telling you that from the code that I glanced at | 16:46:57 |
Sandro 🐧 | AFAIK it is the time lego is allowed to sleep for the time to be | 16:47:41 |
Sandro 🐧 | so if we set it to 23h, it could block execution for up to 23h | 16:48:24 |
hexa | wdym block | 16:48:35 |
hexa | you can always just restart and get a new renewalinfo 😄 | 16:48:45 |
hexa | https://github.com/go-acme/lego/blob/v4.22.2/certificate/renewal.go | 16:49:08 |
emily | ok, here's what I don't understand. why do we need it to sleep at all? it could check ARI and then just say "nope" if it isn't time yet. at most we drift across the recommended renewal by ~a day | 16:49:10 |
hexa | I think that would probably be fine | 16:49:37 |
emily | I don't think that's optimal – the timer-based setup is bad – but it seems to be what fits best with the existing module structure | 16:49:38 |
Sandro 🐧 | https://github.com/go-acme/lego/blob/v4.22.2/cmd/cmd_renew.go#L176 | 16:49:50 |
hexa | I think we don't know what probable renewal intervals sent via renewalinfo would be | 16:49:51 |
Sandro 🐧 | they literally call time.Sleep | 16:50:05 |
hexa | sandro, please check the backlog | 16:50:16 |
hexa | so really, beyond a day this is just an optimization | 16:50:45 |
emily | looking at cmd_renew.go it actually seems like it will force renewal if you set --ari-wait-to-renew-duration 1s and ARI says you should wait a month? | 16:50:59 |
emily | if ariRenewalTime == nil && !needRenewal(cert, domain, ctx.Int(flgDays)) &&
(!forceDomains || slices.Equal(certDomains, domains)) {
return nil
}
| 16:51:08 |
hexa | but there is no harm in letting the acme client sleep and wait between timer runs | 16:51:14 |
emily | the "do nothing if renewal isn't required" is conditionalized on not processing ARI | 16:51:17 |