Bind the Locust master to IPv4 loopback - #8308
Merged
Amaury Chamayou (achamayou) merged 2 commits intoSep 8, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Amaury Chamayou (achamayou)
September 7, 2026 21:25
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is minimal, consistent with existing IPv4-only port probing (AF_INET), and directly addresses the documented Locust bind failure scenario without introducing new behavioral risk.
Pull request overview
This PR updates the Locust benchmark harness to bind the Locust master RPC listener explicitly to the IPv4 loopback address, avoiding failures in environments where localhost resolves to IPv6 but ::1 is unavailable.
Changes:
- Switch Locust master binding host from
localhostto127.0.0.1. - Add an inline comment clarifying the IPv4/IPv6 rationale and matching of probe/worker behavior.
Custom instructions used: None (no repository instruction files were separately loaded from .github/copilot-instructions.md or .github/instructions/ during this review).
File summaries
| File | Description |
|---|---|
tests/infra/locust_benchmark.py |
Bind Locust master explicitly to 127.0.0.1 to avoid localhost IPv6 resolution issues and keep port probing/binding consistent. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Eddy Ashton (eddyashton)
approved these changes
Sep 8, 2026
Amaury Chamayou (achamayou)
deleted the
achamayou-workflow-investigation
branch
September 8, 2026 08:30
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
Follow-up to #8301, fixing the Benchmark Virtual failure on its merge commit,
28d40d248.localhostcan resolve to both IPv4 and IPv6. Locust 2.46.5 then enables IPv6 for its ZeroMQ listener, while the port probe and forked workers use IPv4. If::1is unavailable, the master fails with:This affected all five Locust benchmarks; their workers subsequently spent about five minutes retrying connections.
Use
127.0.0.1explicitly for the port probe and master binding. This preserves #8301's loopback-only binding and port-collision protection without depending on hostname resolution or IPv6 availability.Validation
localhostresolves to both address families but IPv6 loopback is unavailable.scripts/ci-checks.sh -fpassed under WSL.