issue #615: ensure 4GB max_message_size is configured for task workers.

This 4GB limit was already set for MuxProcess and inherited by all
descendents including the context running on the target host, but it was
not applied to the WorkerProcess router.

That explains why the error from the ticket is being raised by the
router within the WorkerProcess rather than the router on the original
target.
new-serialization
David Wilson 5 years ago
parent 3c8c11b360
commit 67759371f9

@ -72,6 +72,8 @@ ANSIBLE_PKG_OVERRIDE = (
u"__author__ = %r\n"
)
MAX_MESSAGE_SIZE = 4096 * 1048576
worker_model_msg = (
'Mitogen connection types may only be instantiated when one of the '
'"mitogen_*" or "operon_*" strategies are active.'
@ -502,6 +504,7 @@ class ClassicWorkerModel(WorkerModel):
# with_items loops.
raise ansible.errors.AnsibleError(shutting_down_msg % (e,))
self.router.max_message_size = MAX_MESSAGE_SIZE
self.listener_path = path
def _on_process_exit(self):
@ -692,7 +695,7 @@ class MuxProcess(object):
self.broker = mitogen.master.Broker(install_watcher=False)
self.router = mitogen.master.Router(
broker=self.broker,
max_message_size=4096 * 1048576,
max_message_size=MAX_MESSAGE_SIZE,
)
_setup_responder(self.router.responder)
mitogen.core.listen(self.broker, 'shutdown', self._on_broker_shutdown)

Loading…
Cancel
Save