Skip to content

Commit

Permalink
ansible_mitogen: Fix "filedescriptor out of range in select()" in Wor…
Browse files Browse the repository at this point in the history
…kerProcess

`mitogen.parent.POLLER_LIGHTWEIGHT` will normally be `PollPoller`, falling
back to `EpollPoller`, `KqueuePoller`, or `Poller`.

Fixes #957

Co-authored-by: Luca Berruti <[email protected]>
Co-authored-by: Philippe Kueck <[email protected]>
  • Loading branch information
3 people committed Apr 19, 2024
1 parent efdd82d commit 4996ec2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansible_mitogen/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ def get_cpu_count(default=None):

class Broker(mitogen.master.Broker):
"""
WorkerProcess maintains at most 2 file descriptors, therefore does not need
WorkerProcess maintains fewer file descriptors, therefore does not need
the exuberant syscall expense of EpollPoller, so override it and restore
the poll() poller.
"""
poller_class = mitogen.core.Poller
poller_class = mitogen.parent.POLLER_LIGHTWEIGHT


class Binding(object):
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Unreleased
----------

* :gh:issue:`952` Fix Ansible `--ask-become-pass`, add test coverage
* :gh:issue:`957` Fix Ansible exception when executing against 10s of hosts
"ValueError: filedescriptor out of range in select()"


v0.3.7 (2024-04-08)
Expand Down
2 changes: 2 additions & 0 deletions docs/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,13 @@ sponsorship and outstanding future-thinking of its early adopters.
<li>jgadling</li>
<li>John F Wall &mdash; <em>Making Ansible Great with Massive Parallelism</em></li>
<li>KennethC</li>
<li><a href="https://github.com/lberruti">Luca Berruti</li>
<li>Lewis Bellwood &mdash; <em>Happy to be apart of a great project.</em></li>
<li>luto</li>
<li><a href="https://mayeu.me/">Mayeu a.k.a Matthieu Maury</a></li>
<li><a href="https://twitter.com/nathanhruby">@nathanhruby</a></li>
<li><a href="https://github.com/opoplawski">Orion Poplawski</a></li>
<li><a href="https://github.com/philfry">Philippe Kueck</a></li>
<li><a href="http://pageflows.com/">Ramy</a></li>
<li>Scott Vokes</li>
<li><a href="https://twitter.com/sirtux">Tom Eichhorn</a></li>
Expand Down

0 comments on commit 4996ec2

Please sign in to comment.