pytest-dev / pytest-dev/execnet
Group.__init() should be parallelised
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 102
- 派生
- 47
- PR 合并指标
- 30 天内没有已合并 PR
描述
- Bitbucket: https://bitbucket.org/hpk42/execnet/issue/28
- Originally reported by: @crusaderky
- Originally created at: 2014-01-22T16:51:21.959
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.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 multi.py 中的 Group.init 开始,检查 gateway_base.py 约第 360 行附近的代码,报告中的补丁会在那里造成死锁。使用许多 SSH 网关重现初始化过程,并将行为与附加的补丁进行比较。完成标准是:Group 初始化能够并行连接到主机而不会发生死锁,同时 Group.remote_exec() 仍能正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- distributed-systems
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100