Commit 6f2fe45
committed
fix(dstack-ingress): renew one lineage per run, and size the timeout to the wait
Two problems that compound each other.
`certbot renew` renews *every* lineage in /etc/letsencrypt/renewal unless
given --cert-name, and we never gave it one. run_pass calls this once per
domain, so N domains meant N runs each covering all N lineages -- and
renew_certificate then reported the result against whichever domain
happened to ask, so domain A could be recorded as renewed because domain
B was. Scope each run to the lineage it is named for.
The run timeout was a hard-coded 300s. The dominant term inside a run is
the DNS propagation wait, which the plugin sleeps through in-process --
and linode's own CERTBOT_PROPAGATION_SECONDS is 300, so on linode the
cap could never be met and dns-01 timed out every time, on issuance as
well as renewal. Before --cert-name it was worse still: the cap covered
all lineages at once, so three cloudflare domains (120s each) could not
fit either. Size it from the wait, and let CERTBOT_TIMEOUT override.
--cert-name does not change the no-op wording renew_certificate parses:
"No renewals were attempted." comes from _renew_describe_results, which
runs for `renew` whether or not the lineage set was filtered. Checked
against certbot 5.7.0, the version the image installs.
Tested: 11 new cases in scripts/tests/test_certman.py covering scope
(plain, wildcard, delegation, and certonly staying on -d) and the
timeout (per-provider, delegation, override, invalid override, and a
provider with no propagation setting). All five that assert the new
behaviour fail against the previous code.1 parent ea44c2c commit 6f2fe45
3 files changed
Lines changed: 177 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
| 311 | + | |
| 312 | + | |
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
| |||
342 | 349 | | |
343 | 350 | | |
344 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
345 | 358 | | |
346 | 359 | | |
347 | 360 | | |
| |||
380 | 393 | | |
381 | 394 | | |
382 | 395 | | |
| 396 | + | |
383 | 397 | | |
384 | 398 | | |
385 | 399 | | |
386 | | - | |
| 400 | + | |
387 | 401 | | |
388 | 402 | | |
389 | 403 | | |
| |||
412 | 426 | | |
413 | 427 | | |
414 | 428 | | |
415 | | - | |
| 429 | + | |
| 430 | + | |
416 | 431 | | |
417 | 432 | | |
418 | 433 | | |
| |||
433 | 448 | | |
434 | 449 | | |
435 | 450 | | |
| 451 | + | |
436 | 452 | | |
437 | 453 | | |
438 | 454 | | |
439 | | - | |
| 455 | + | |
440 | 456 | | |
441 | 457 | | |
442 | 458 | | |
| |||
468 | 484 | | |
469 | 485 | | |
470 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
471 | 495 | | |
472 | 496 | | |
473 | 497 | | |
| |||
486 | 510 | | |
487 | 511 | | |
488 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
489 | 538 | | |
490 | 539 | | |
491 | 540 | | |
| |||
Lines changed: 123 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
126 | 249 | | |
127 | 250 | | |
128 | 251 | | |
| |||
0 commit comments