ansible_mitogen: Fix "filedescriptor out of range in select()" in WorkerProcess

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

Fixes #957

Co-authored-by: Luca Berruti <nadirio@gmail.com>
Co-authored-by: Philippe Kueck <bqobccy6ejnq2bqvmebqiwqha4cs4@protected32.unixadm.org>
pull/1065/head
Alex Willmer 7 months ago
parent efdd82d1ab
commit 4996ec2f09

@ -281,11 +281,11 @@ def get_cpu_count(default=None):
class Broker(mitogen.master.Broker): 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 exuberant syscall expense of EpollPoller, so override it and restore
the poll() poller. the poll() poller.
""" """
poller_class = mitogen.core.Poller poller_class = mitogen.parent.POLLER_LIGHTWEIGHT
class Binding(object): class Binding(object):

@ -22,6 +22,8 @@ Unreleased
---------- ----------
* :gh:issue:`952` Fix Ansible `--ask-become-pass`, add test coverage * :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) v0.3.7 (2024-04-08)

@ -126,11 +126,13 @@ sponsorship and outstanding future-thinking of its early adopters.
<li>jgadling</li> <li>jgadling</li>
<li>John F Wall &mdash; <em>Making Ansible Great with Massive Parallelism</em></li> <li>John F Wall &mdash; <em>Making Ansible Great with Massive Parallelism</em></li>
<li>KennethC</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>Lewis Bellwood &mdash; <em>Happy to be apart of a great project.</em></li>
<li>luto</li> <li>luto</li>
<li><a href="https://mayeu.me/">Mayeu a.k.a Matthieu Maury</a></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://twitter.com/nathanhruby">@nathanhruby</a></li>
<li><a href="https://github.com/opoplawski">Orion Poplawski</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><a href="http://pageflows.com/">Ramy</a></li>
<li>Scott Vokes</li> <li>Scott Vokes</li>
<li><a href="https://twitter.com/sirtux">Tom Eichhorn</a></li> <li><a href="https://twitter.com/sirtux">Tom Eichhorn</a></li>

Loading…
Cancel
Save