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

cannot specify task of UserClass when locust run on distributed mode #2657

Closed
2 tasks done
skyterra opened this issue Mar 28, 2024 · 5 comments · Fixed by #2666
Closed
2 tasks done

cannot specify task of UserClass when locust run on distributed mode #2657

skyterra opened this issue Mar 28, 2024 · 5 comments · Fixed by #2666
Labels

Comments

@skyterra
Copy link

Prerequisites

Description

if launch locust with --processes argument, choosing task will not working.

image

Command line

locust --processes 2 --class-picker -f locustfiles

Locustfile contents

...

Python version

3.12

Locust version

2.24

Operating system

macOS or centOS

@skyterra skyterra added the bug label Mar 28, 2024
@cyberw
Copy link
Collaborator

cyberw commented Mar 28, 2024

huh. good find. unfortunately it will probably be hard to support, so I'll probably "fix" it by throwing an error (at least for now)

@skyterra
Copy link
Author

I guess the reason it's hard to support is that in distributed mode, there's no shared data strategy. The single-process mode uses memory, while distributed mode would require introducing Redis or other memory database.

@cyberw
Copy link
Collaborator

cyberw commented Mar 29, 2024

Actually. When I think about it, it should work. Not sure when I'll have time to look at it though...

@andrewbaldwin44
Copy link
Collaborator

It would be the same for distributed mode, we need to communicate between the workers and the master node so that the workers know that the list of tasks has changed. @cyberw Perhaps in the meantime we should throw an error or note something in the documentation that these arguments don't work together yet

@cyberw
Copy link
Collaborator

cyberw commented Apr 2, 2024

We shouldnt really have options that only work with non-distributed so we need to try and solve it (or remove task selection entirely). But erroring out when combined with --processes or --master is better than the current state I guess :)

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

Successfully merging a pull request may close this issue.

3 participants