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

Group.__init() should be parallelised #28

Open
pytestbot opened this issue Jul 21, 2017 · 1 comment
Open

Group.__init() should be parallelised #28

pytestbot opened this issue Jul 21, 2017 · 1 comment

Comments

@pytestbot
Copy link

Consider the following snippet:

hosts = [...list of hosts...]
group = execnet.Group(("ssh %s" % host for host in hosts))
group.remote_exec(something)

Imagine having a grid of 200 hosts.
While Group.remote_exec() will run on all the hosts in parallel, Group.__init__() will connect via ssh to each one of them, serially. On a typical LAN, this easily accounts to minutes.

I attach a patch for multi.py (on top of the latest hg commit) that is intended to fix the problem. However, with that patch the program deadlocks in gateway_base.py, line 360, and I can't figure out the reason.

@pytestbot
Copy link
Author

Original comment by @RonnyPfannschmidt

the patch is a good idea, but we need to take the new event handlers into account, might be a item for version 1.4

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

1 participant