-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add option to force the use of IPv4 #3250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add option to force the use of IPv4 #3250
Conversation
3824523 to
1201710
Compare
|
In general, I see the need for this feature, so I like the PR. However:
|
b734fef to
228bd45
Compare
can be used to work around potential ipv6 issues in deployed environments
228bd45 to
eff17f8
Compare
fixed up the whitespace removal, my vscode setup code was configured to do it automatically and have fixed up the git commit. Should have been the PR description
The client was the one that was causing my issue, the worker was the one that was resolving the IPv6 address to get to the master. The use_ipv4 function seems to be used by both client and server as its performed in the BaseSocket class, it probably doesn't need to be in the master config since you can control it with bind, but since they both had a consistent setup I figured it would be easier to say you could just set the ipv4 only flag on both to ensure its consistent. |
|
Did you try using |
Set the the env var and updated to use the hostname but looks like it doesn't apply I'm guessing if there is an explicit config on the socket that wins? Would it be better to remove the IPv6 handling in locust if zeromq offers those env vars? |
I think it might be. At the very least we can change that line of code to also respect the zeromq env var? |
Locust works great in scalable container environments like ECS which has different ways to allow for the workers to talk to master nodes. One option is Service Connect/Envoy Proxy, this adds a host file entry for a service name for both IPv4 and IPv6 based comms. Except while the OS might have an Ipv6 address the added entry can't be resolved and so the connection fails.
See aws/amazon-ecs-service-connect-agent#120 for a more detailed rundown of the findings for this
This PR allows you to force IPv4 as the preferred option instead of the current setup which prefers IPv6 if the provided hostname resolves to an IPv6 address.
This can be configured using the --master-ipv4-only argument and will apply to both master and workers