Merge pull request #325 from dw/dmw

Dmw
pull/318/head
dw 6 years ago committed by GitHub
commit 9fd135b02c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -593,8 +593,8 @@ class Connection(ansible.plugins.connection.ConnectionBase):
try:
return self.call_async(func, *args, **kwargs).get().unpickle()
finally:
LOG.debug('Call took %d ms: %s%r', 1000 * (time.time() - t0),
func.__name__, args)
LOG.debug('Call took %d ms: %r', 1000 * (time.time() - t0),
mitogen.parent.CallSpec(func, args, kwargs))
def create_fork_child(self):
"""

@ -4,7 +4,7 @@ coverage==4.5.1
Django==1.6.11 # Last version supporting 2.6.
mock==2.0.0
pytz==2012d # Last 2.6-compat version.
paramiko==2.3.1 # Last 2.6-compat version.
paramiko==2.3.2 # Last 2.6-compat version.
pytest-catchlog==1.2.2
pytest==3.1.2
PyYAML==3.11; python_version < '2.7'

@ -57,11 +57,9 @@ write files.
Installation
------------
1. Thoroughly review the :ref:`noteworthy_differences` and :ref:`changelog`.
2. Verify Ansible 2.3-2.6.1 and Python 2.6, 2.7 or 3.6 are listed in ``ansible
--version`` output.
3. Download and extract |mitogen_url| from PyPI.
4. Modify ``ansible.cfg``:
1. Thoroughly review :ref:`noteworthy_differences` and :ref:`changelog`.
2. Download and extract |mitogen_url|.
3. Modify ``ansible.cfg``:
.. parsed-literal::
@ -74,12 +72,16 @@ Installation
per-run basis. Like ``mitogen_linear``, the ``mitogen_free`` strategy exists
to mimic the ``free`` strategy.
5. If targets have a restrictive ``sudoers`` file, add a rule like:
4. If targets have a restrictive ``sudoers`` file, add a rule like:
::
::
deploy = (ALL) NOPASSWD:/usr/bin/python -c*
5. Subscribe to the `mitogen-announce mailing list
<https://www.freelists.org/list/mitogen-announce>`_ in order to stay up to
date with new releases and important bug fixes.
Demo
~~~~
@ -123,6 +125,10 @@ Testimonials
Noteworthy Differences
----------------------
* Ansible 2.3-2.5 are supported along with Python 2.6, 2.7 or 3.6. Verify your
installation is running one of these versions by checking ``ansible
--version`` output.
* The Ansible ``raw`` action executes as a regular Mitogen connection,
precluding its use for installing Python on a target. This will be addressed
soon.

@ -15,6 +15,16 @@ Release Notes
</style>
.. comment
v0.2.3 (2018-07-??)
-------------------
* `#315 <https://github.com/dw/mitogen/pull/315>`_: Mitogen for Ansible is
supported under Ansible 2.6. Contributed by `Dan Quackenbush
<https://github.com/danquack>`_.
v0.2.2 (2018-07-??)
-------------------
@ -31,6 +41,12 @@ Mitogen for Ansible
network device connections, however it should still be possible to use device
connections while Mitogen is active.
* `#300 <https://github.com/dw/mitogen/issues/300>`_: an exception could appear
on OS X during shutdown due to scheduling pending Kevent filter changes for
file descriptors that have already been closed before the IO loop resumes. As
a temporary workaround, Mitogen does not make use of Kevent's bulk change
feature.
* `#301 <https://github.com/dw/mitogen/pull/301>`_: variables like ``$HOME`` in
the ``remote_tmp`` setting are evaluated correctly.
@ -42,10 +58,6 @@ Mitogen for Ansible
process environment cleanup, caused by the change in v0.2.1 to run local
tasks with the correct environment.
* `#315 <https://github.com/dw/mitogen/pull/315>`_: Mitogen for Ansible is
supported under Ansible 2.6. Contributed by `Dan Quackenbush
<https://github.com/danquack>`_.
* `#317 <https://github.com/dw/mitogen/issues/317>`_: respect the verbosity
setting when writing to to Ansible's ``log_path`` log file, if it is enabled.
Child log filtering was also incorrect, causing the master to needlessly wake

@ -531,7 +531,15 @@ class KqueuePoller(mitogen.core.Poller):
def _control(self, fd, filters, flags):
mitogen.core._vv and IOLOG.debug(
'%r._control(%r, %r, %r)', self, fd, filters, flags)
self._changelist.append(select.kevent(fd, filters, flags))
# TODO: at shutdown it is currently possible for KQ_EV_ADD/KQ_EV_DEL
# pairs to be pending after the associated file descriptor has already
# been closed. Fixing this requires maintaining extra state, or perhaps
# making fd closure the poller's responsibility. In the meantime,
# simply apply changes immediately.
# self._changelist.append(select.kevent(fd, filters, flags))
changelist = [select.kevent(fd, filters, flags)]
events, _ = mitogen.core.io_op(self._kqueue.control, changelist, 0, 0)
assert not events
def start_receive(self, fd, data=None):
mitogen.core._vv and IOLOG.debug('%r.start_receive(%r, %r)',

Loading…
Cancel
Save