Locust: Locust can not run distributed with the web interface disabled

Created on 18 Aug 2014  路  8Comments  路  Source: locustio/locust

Hi,

I wanted to run Locust from jenkins to kick off a job overnight in distributed mode. However I came across the error (in the title) when running with --no-web and --master. Is this something that can be resolved easily?

Most helpful comment

Can we please fix this?
It's preventing me from using locust in our CI environment.

All 8 comments

Agree, just stumped-on the same. For me it is quite strange, but maybe we just don't undestand some internal logic

Same here, you might try scripting it to start;
POST
http://host:8089/swarm
locust_count = x
hatch_rate = y

and stop;
GET
http://host:8089/stop

I agree, this is something that should be fixed. It's planned, but until it has landed, one could use @pepedocs' work-around.

Currently I'm thinking that one will have to specify the expected number of slave nodes, as a command line argument, when starting the master. Then the swarming will start once that number of slave nodes has connected. We might also want to have some kind of timeout after which the master will die unless the expected number of slaves has connected.

Any thoughts on that?

Sounds good to me, and I would expect the timeout will be configurable which will be very useful when master and slaves are part of an orchestration in a cloud, where most of the time their up times are unpredictable.

Yes, the timeout should definitely be configurable.

Just a suggestions, but why not simply leave the web-ui available and, following along the lines of @pepedocs suggestion, allow locust itself to make the swarm request (_instead of relying on something like curl_)

In other words, you start master / slaves as you normally would but provide a command-line option to locust so you can kick off the swarm. For example,

[master]

locust --master ...

[slaves x N]

locust --slave --master-host <master-ip>

[launcher]

locust --master-host <master-ip>  --clients=100 hatch-rate=5  swarm

Under the covers the last instance ends up using requests library to send the POST to the master. This allows the testing to be kicked off in a more defined manner instead of relying on waiting for the last slave to connect.

Leavin the web-ui up and running will would also allow the same method to be used to retrieve the *.csv files by just adding additional command line options.

Can we please fix this?
It's preventing me from using locust in our CI environment.

I need help with implementing this. Can someone advise me on how to proceed with #275?

Was this page helpful?
0 / 5 - 0 ratings