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

Setting PYTHONUNBUFFERED=1 doesn't work with csh #25

Open
stevereads opened this issue Oct 3, 2024 · 1 comment
Open

Setting PYTHONUNBUFFERED=1 doesn't work with csh #25

stevereads opened this issue Oct 3, 2024 · 1 comment

Comments

@stevereads
Copy link

I'd like to run swarm, because my use case is running a load test from a number of machines that I connect to via ssh. So I'd use swarm to ssh to each client, launch a test, and target a machine in the same datacenter rack as the clients.

It's out of my control, but all the machines in that datacenter default to using csh. So when I run swarm, it fails with this error:

PYTHONUNBUFFERED=1: Command not found.

I think that's because swarm.py contains this line:

    extra_env = ["PYTHONUNBUFFERED=1"]

, which then gets picked up in cmd. That's how bash and friends set an environment variable for the duration of one command, but it's not how csh does it. In csh, as I understand it, you have to run

env PYTHONUNBUFFERED=1 [rest of command]

How would I make swarm work with csh? bash exists on the remote box, so if I could do bash [rest of command], that would work. Or I could keep it running in csh, but set the env var in a different way. Is there some way to make this work without modifying swarm.py?

@cyberw
Copy link
Collaborator

cyberw commented Oct 3, 2024

Hmm... I guess there's no way of changing the default shell for your user to use bash?

I'm not really developing locust-swarm any more (I'm building locust.cloud instead :) so I might mark this repo as archived soon...

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

No branches or pull requests

2 participants