Skip to content

Commit 41d8a8a

Browse files
committed
Merge remote-tracking branch 'origin/dmw'
* origin/dmw: issue #613: must await 'exit' and 'disconnect' in wait=False test Import LGTM config to disable some stuff Fix up another handful of LGTM errors. tests: work around AnsibleModule.run_command() race. docs: mention another __main__ safeguard docs: tweaks formatting error docs: make Sphinx install soft fail on Python 2. issue #598: allow disabling preempt in terraform issue #598: update Changelog.
2 parents 74834c8 + 0c1d882 commit 41d8a8a

File tree

15 files changed

+469
-25
lines changed

15 files changed

+469
-25
lines changed

ansible_mitogen/loaders.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232

3333
from __future__ import absolute_import
3434

35+
__all__ = [
36+
'action_loader',
37+
'connection_loader',
38+
'module_loader',
39+
'module_utils_loader',
40+
'shell_loader',
41+
'strategy_loader',
42+
]
43+
3544
try:
3645
from ansible.plugins.loader import action_loader
3746
from ansible.plugins.loader import connection_loader

ansible_mitogen/process.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import multiprocessing
3333
import os
3434
import resource
35-
import signal
3635
import socket
3736
import sys
3837

ansible_mitogen/runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"""
3838

3939
import atexit
40-
import codecs
4140
import imp
4241
import os
4342
import re

docs/ansible_detailed.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ Installation
8282
<form action="https://networkgenomics.com/save-email/" method="post" id="emailform">
8383
<input type=hidden name="list_name" value="mitogen-announce">
8484

85-
Releases occur frequently and often include important fixes. Subscribe
86-
to the mitogen-announce list to stay updated.
85+
Get notified of new releases and important fixes.
8786

8887
<p>
8988
<input type="email" placeholder="E-mail Address" name="email" style="font-size: 105%;">

docs/changelog.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,21 @@ Mitogen for Ansible
7272
detected, to work around a broken heuristic in popular SELinux policies that
7373
prevents inheriting ``AF_UNIX`` sockets across privilege domains.
7474

75-
* `#467 <https://github.com/dw/mitogen/issues/467>`_: an incompatibility
75+
* `#467 <httpe://github.com/dw/mitogen/issues/467>`_: an incompatibility
7676
running Mitogen under Molecule was resolved.
7777

78-
* `#547 <https://github.com/dw/mitogen/issues/547>`_: fix a serious deadlock
79-
possible during initialization of any task executed by forking, such as
80-
``async`` tasks, tasks using custom :mod:`ansible.module_utils`,
78+
* `#547 <https://github.com/dw/mitogen/issues/547>`_,
79+
`#598 <https://github.com/dw/mitogen/issues/598>`_: fix a serious deadlock
80+
possible while initializing the service pool of any child, such as during
81+
connection, ``async`` tasks, tasks using custom :mod:`module_utils`,
8182
``mitogen_task_isolation: fork`` modules, and those present on an internal
8283
blacklist of misbehaving modules.
8384

85+
This deadlock is relatively easy hit, has been present since 0.2.0, and is
86+
likely to have impacted many users. For new connections it could manifest as
87+
a *Connection timed out* error, for forked tasks it could manifest as a
88+
timeout or an apparent hang.
89+
8490
* `#549 <https://github.com/dw/mitogen/issues/549>`_: the open file descriptor
8591
limit for the Ansible process is increased to the available hard limit. It is
8692
common for distributions to ship with a much higher hard limit than their
@@ -114,7 +120,8 @@ Mitogen for Ansible
114120
is more accurately inferred for `meta: reset_connection`, the `synchronize`
115121
module, and for any action plug-ins that establish additional connections.
116122

117-
* `#605 <https://github.com/dw/mitogen/issues/605>`_: fix a deadlock managing a
123+
* `#598 <https://github.com/dw/mitogen/issues/598>`_,
124+
`#605 <https://github.com/dw/mitogen/issues/605>`_: fix a deadlock managing a
118125
shared counter used for load balancing.
119126

120127
* `#615 <https://github.com/dw/mitogen/issues/615>`_: streaming file transfer
@@ -224,6 +231,7 @@ bug reports, testing, features and fixes in this release contributed by
224231
`Stefane Fermigier <https://github.com/sfermigier>`_,
225232
`Szabó Dániel Ernő <https://github.com/r3ap3rpy>`_,
226233
`Ulrich Schreiner <https://github.com/ulrichSchreiner>`_,
234+
`yen <https://github.com/antigenius0910>`_,
227235
`Yuki Nishida <https://github.com/yuki-nishida-exa>`_,
228236
`@alexhexabeam <https://github.com/alexhexabeam>`_,
229237
`@DavidVentura <https://github.com/DavidVentura>`_,

docs/howitworks.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,12 @@ code occurring after the first conditional that looks like a standard
673673
if __name__ == '__main__':
674674
run_some_code()
675675
676-
This is a hack, but it's the least annoying hack I've found for the problem
677-
yet.
676+
To further avoid accidental execution, Mitogen will refuse to serve
677+
:mod:`__main__` to children if no execution guard is found, as it is common
678+
that no guard is present during early script prototyping.
679+
680+
These are hacks, but they are the safest and least annoying found to solve the
681+
problem.
678682

679683

680684
Avoiding Negative Imports

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Sphinx==2.1.2
2-
sphinxcontrib-programoutput==0.14
3-
alabaster==0.7.10
1+
Sphinx==2.1.2; python_version > '3.0'
2+
sphinxcontrib-programoutput==0.14; python_version > '3.0'
3+
alabaster==0.7.10; python_version > '3.0'

examples/mitogen-fuse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def main(router):
245245
if sys.platform == 'darwin':
246246
kwargs['volname'] = '%s (Mitogen)' % (sys.argv[1],)
247247

248-
f = fuse.FUSE(
248+
fuse.FUSE(
249249
operations=Operations(sys.argv[1]),
250250
mountpoint=sys.argv[2],
251251
foreground=True,

0 commit comments

Comments
 (0)