fix(localdns): reduce startup polling interval#8534
Open
jingwenw15 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces localdns startup polling intervals from 1s to 0.1s so the node bootstrap path waits less when CoreDNS comes up quickly, while preserving the existing wall-clock timeout semantics. The PID-file wait now counts in tenths of a second (10× the timeout), and the readiness call-site bumps maxattempts from 60 to 600 to match the 60s timeout at the finer interval.
Changes:
- Introduce
LOCALDNS_POLL_INTERVAL_SECONDS=0.1and reworkstart_localdnsto use tenth-second counters soSTART_LOCALDNS_TIMEOUT=10still yields a ~10s ceiling. - Switch
wait_for_localdns_ready's sleep to 0.1s and update the production call-site towait_for_localdns_ready 600 60. - Add ShellSpec tests asserting both loops sleep with
0.1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| parts/linux/cloud-init/artifacts/localdns.sh | Faster polling in start_localdns/wait_for_localdns_ready plus updated max-attempt arg at the call-site. |
| spec/parts/linux/cloud-init/artifacts/localdns_spec.sh | New ShellSpec cases asserting the 0.1s sleep interval in both helper loops. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Testing