Skip to content
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

Add "stopping" state. #982

Merged
merged 1 commit into from
Mar 19, 2019
Merged

Add "stopping" state. #982

merged 1 commit into from
Mar 19, 2019

Conversation

solowalker27
Copy link
Contributor

Fixes #981

…when trying to stop a distributed load and slaves rejoin.
@mattiekat
Copy link

Looks good to me. Tested working on my setup.

@mangatmodi
Copy link

mangatmodi commented Mar 19, 2019

I saw the code and it should work, but I am trying to think why this is introduced.

here -

self.client.send(Message("client_ready", None, self.client_id))

Client on being stop sends client_ready message. Master now hatch the client here -
self.start_hatching(self.num_clients, self.hatch_rate)

Which was added in recent commit - 1549929

Client is now in HATCHING state -

self.slave_state = STATE_HATCHING

With a bit of bad luck(or enough number of runs), server might receive one of the client as hatching and hence the condition will become false -

if not self.state == STATE_INIT and all(map(lambda x: x.state != STATE_RUNNING and x.state != STATE_HATCHING, self.clients.all)):

Adding STOPPING works as it will avoid hatching the clients, no matter the status. It seems good enough, but I see the problem when a client is stopped, it shouldn't be ready.

@mangatmodi
Copy link

mangatmodi commented Mar 19, 2019

I think it is ready because master can send another test request, after stopping one.

Copy link
Member

@cgoldberg cgoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.. I'll merge this and we'll test more against master.
thanks! 👍

@cgoldberg cgoldberg merged commit 8b17c28 into locustio:master Mar 19, 2019
@wincus
Copy link

wincus commented Apr 4, 2019

validated that this fixed the issue on our setup as well. Thanks!

@tsykora-verimatrix
Copy link

glad to see this fixed, good job, is it going to be part of 0.12.0 or how it will be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to stop load from web UI with 0.11.0
6 participants