You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certbot loop retries could run without proper pacing and shutdown did not interrupt the wait/work cleanly. This caused provider request bursts and delayed process termination.
Root cause and fix
Apply the configured interval through an interruptible wait and honor shutdown before starting another reconciliation.
Implementation
The branch records the following focused implementation work:
fix(certbot): pace daemon and run once hook
fix(certbot): stop daemon gracefully
Changed paths:
dstack/certbot/cli/src/main.rs
dstack/certbot/src/bot.rs
Scope
This PR addresses one logical certbot finding. It intentionally excludes the acceptance-test infrastructure from #841 and unrelated product fixes from #840.
Dependency and merge order
This PR is based directly on master and does not require another split product PR to merge first.
The declared base was verified as an ancestor of the PR head.
Focused compile/check verification was run for the changed component where applicable; non-Rust packaging or configuration changes were reviewed against their exact branch delta.
Post-merge correction to the root-cause description, so future archaeology on this commit is not misled.
The PR describes the symptom as "provider request bursts". The idle path never reaches the provider. renew_cert_if_needed returns early on a local check:
need_renew only parses the on-disk certificate, and create_cert_if_needed above it is a local file check too. So in the steady state the old continue — which skipped sleep(renew_interval) on exactly the common !renewed path — produced a hot spin loop: a file read, an x509 parse and two info! lines per iteration, at full CPU, indefinitely. No ACME or Cloudflare traffic was involved; the error path was the one that stayed paced, since it fell through to the sleep.
The fix is correct as merged, and the CPU/log-flood impact is arguably worse than the described one for a CVM. Only the stated cause was off.
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
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.
Problem
Certbot loop retries could run without proper pacing and shutdown did not interrupt the wait/work cleanly. This caused provider request bursts and delayed process termination.
Root cause and fix
Apply the configured interval through an interruptible wait and honor shutdown before starting another reconciliation.
Implementation
The branch records the following focused implementation work:
fix(certbot): pace daemon and run once hookfix(certbot): stop daemon gracefullyChanged paths:
dstack/certbot/cli/src/main.rsdstack/certbot/src/bot.rsScope
This PR addresses one logical
certbotfinding. It intentionally excludes the acceptance-test infrastructure from #841 and unrelated product fixes from #840.Dependency and merge order
This PR is based directly on
masterand does not require another split product PR to merge first.Verification
git diff --check origin/master..origin/codex/fix-certbot-daemon-lifecycle: passed.