Skip to content

fix(localdns): reduce startup polling interval#8534

Open
jingwenw15 wants to merge 1 commit into
mainfrom
jingwenwu/localdns-sleep-interval-only
Open

fix(localdns): reduce startup polling interval#8534
jingwenw15 wants to merge 1 commit into
mainfrom
jingwenwu/localdns-sleep-interval-only

Conversation

@jingwenw15
Copy link
Copy Markdown
Member

Summary

  • reduce localdns PID-file polling from 1s to 0.1s while preserving the existing timeout semantics
  • reduce localdns readiness polling from 1s to 0.1s and scale the production call-site attempts accordingly
  • add focused ShellSpec coverage for the 0.1-second polling interval in both helper loops

Testing

  • shellspec --shell bash spec/parts/linux/cloud-init/artifacts/localdns_spec.sh:668
  • shellspec --shell bash spec/parts/linux/cloud-init/artifacts/localdns_spec.sh:733

Copilot AI review requested due to automatic review settings May 19, 2026 01:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.1 and rework start_localdns to use tenth-second counters so START_LOCALDNS_TIMEOUT=10 still yields a ~10s ceiling.
  • Switch wait_for_localdns_ready's sleep to 0.1s and update the production call-site to wait_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants