Repository navigation
kbuild: replace google.com probes with bounded retries - #3277
Open
adityagrewal wants to merge 1 commit into
Open
adityagrewal wants to merge 1 commit into
adityagrewal wants to merge 1 commit into
Conversation
Remove the hard-coded google.com connectivity and DNS probes from KBuild and config/runtime/base/python.jinja2, which could hang indefinitely or loop without bound when Kubernetes pod networking was still initializing. Apply bounded retries with explicit (5.0, 15.0)s connect/read timeouts, a 2.0s retry interval, and a 60.0s monotonic wall-clock deadline to the initial KernelCI API and storage requests, reporting exhausted readiness as a sanitized infrastructure error rather than calling sys.exit(). Closes: kernelci#3197 Assisted-by: Gemini Signed-off-by: Aditya Grewal <aditya1998yr@gmail.com>
adityagrewal
force-pushed
the
fix-network-readiness-check
branch
from
November 17, 2026 23:14
8cbf90d to
b1c17b3
Compare
This branch has not been deployed
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.
Replace the hard-coded
google.comstartup probes with bounded retries on the actual KernelCI API and storage requests (Strategy 1 in #3197).Why
KBuild._verify_network()sent an un-boundedrequests.get("https://google.com")without a timeout and never decremented its retry counter on non-200 HTTP responses.config/runtime/base/python.jinja2ran asocket.gethostbyname("www.google.com")loop before starting a job, creating an external dependency and risking unbounded DNS calls instead of verifying connectivity to KernelCI services.Changes
kernelci/kbuild.py:KBuild._verify_network()._request_with_retry()with(5.0, 15.0)s(connect, read)timeouts, a2.0s retry interval, and a60.0stime.monotonic()wall-clock deadline.Timeout,ConnectionError,socket.gaierror) and transient HTTP statuses (429,5xx), letting configuration/programming errors fail fast.KBuildInfraError(with sanitized hostname and elapsed duration) and reported viaself.submit_failure()inwrite_script()instead of callingsys.exit().config/runtime/base/python.jinja2:www.google.comDNS loop frommain().BaseJob._call_with_retry()using the same timeout andtime.monotonic()bounds.InfraReadinessErrorinmain()by reportingresult='incomplete'witherror_code='infra_error'and sanitized service details.tests/test_kbuild.py:Validation
pytest tests/test_kbuild.pyandruffchecks locally.kbuildvalidation on a newly started Kubernetes node is ready for an operator to trigger.Closes #3197
Assisted-by: Gemini