-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Master-host IP is not overrided by environment variable. #1424
Comments
The env var name is LOCUST_MASTER_NODE_HOST, see https://docs.locust.io/en/stable/configuration.html#all-available-configuration-options This was introduced to work around a common issue where people got collisions with the LOCUST_MASTER_PORT being set by kubernetes, see #1226 That workaround (non-standard env var name) is a little ugly tbh... |
Hello. I have checked the doc here : https://docs.locust.io/en/stable/configuration.html#environment-variables But I saw 'example :' without any example, so I was thinking that the doc is not up to date and don't scroll after that point ;p I just tried the variable and everything works fine ;p |
No worries @bat79a , this was a good issue! I'm trying to fix the documentation now... @heyman I think we should consider not using custom env var names, as it violates the principle of least surprise (as shown by this ticket), but instead detecting and throwing a nice descriptive error for how to work around #1226. |
Here i'ts why I have tried the MASTER_HOST variable for overriding the value. Extract : PS : I tried to put a domain name and not an ip and it doesn't seem to work. Can we enter a domaine name instead of the ip ?
Thx a lot for you answer and your job ;p |
The documentation issue is fixed now (the invisible code block is there now): https://docs.locust.io/en/latest/configuration.html#environment-variables Domain names should work, maybe dns resolution is not configured properly? |
I've now fixed (ca8ef51) the help text which I believe was what source of confusion in this issue:
I think it's much more likely that people to run into the issue of env var collisions when running locust on Kubernetes, than people running into issues because they guess the env var to be |
Hello @cyberw
I'm so sorry but impossible to put a domain name and make the worker visible for the master... I have tried on my kubernetes cluster:
Expose the service on my domaine name (wildcard where all the other services works perfectly)
It works only with the internal pod endpoint ip ? Thx a lot. |
@bat79a If it works with the IP it sounds like some kind of DNS issue, and I'm guessing that this is caused by some issue with your environment. Can you ping the master hostname from within a worker container? |
@heyman GG, I forgot to open the container port 5557 in my yml manifest ;p Thx a lot to all. Have a nice day. |
#899 # Describe the bug
When you try to override the --master-host ip with an environnement variable (k8s configMap) the ip is not use by the worker.
I have try this two variables without any effect :
Expected behavior
The worker will use the environment variable and the master will see this worker.
Actual behavior
Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: