tripleo-common/tripleo_common
Michele Baldessari 6f55c89171 Use oslo_rootwrap subprocess module in order to gain proper eventlet awareness
Via 31cfdbd407
oslo.rootwrap gained support eventlet when using subprocess. By moving
to oslo_rootwrap.subprocess we make sure that with python3 the
subprocess calls use eventlet.green.subprocess if eventlet is used.
This worked on python2 because (from above commit):
"""
On Python 2, it "works" to use directly subprocess: subprocess.Popen
calls os.pipe() and os.fdopen(fd) which are both monkey-patched. On
Python 3, it doesn't work because subprocess uses os.pipe() and
io.open(fd), and the io module is *not* monkey-patched at all.
"""

By applying this change what happens is that the heartbeat thread is
able to be scheduled every 15seconds by default. Without this patch
what we have been observing with python3 is that while running ansible
mistral would constantly log error messages like the following:
2019-05-02 19:14:36.702 8 WARNING oslo.messaging._drivers.impl_rabbit [-] Unexpected error during heartbeart thread processing, retrying...: amqp.exceptions.ConnectionForced: Too many heartbeats missed

With this change we could not reproduce this issue during a deployment
and no missed heartbeat messages were observed during the deploy.

Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
Co-Authored-By: Hervé Beraud <hberaud@redhat.com>

Closes-Bug: #1826281

Change-Id: Id22b1465d6d2424d90781983b970aba4545feb8a
(cherry picked from commit 2e54cff0db)
2019-05-04 04:58:09 +02:00
..
actions Use oslo_rootwrap subprocess module in order to gain proper eventlet awareness 2019-05-04 04:58:09 +02:00
filters Add logging to capabilities filter 2017-09-20 17:50:42 +00:00
image Fix support for v1 manifests 2019-04-16 14:30:12 +12:00
releasenotes/notes Wire in parameters.convert_docker_params 2019-04-10 13:25:39 -04:00
templates Use pyyaml to output group vars 2018-11-01 15:43:30 -06:00
tests Update default Ceph container image to use to the Nautilus version 2019-04-25 13:06:08 +00:00
utils Adding support for the new validation framework 2019-04-17 10:21:28 +02:00
__init__.py Add ReNo support 2017-01-12 12:06:02 +00:00
arch.py Default to host CPU architecture if none is supplied 2017-08-05 09:11:20 +10:00
constants.py Adding support for the new validation framework 2019-04-17 10:21:28 +02:00
exception.py Fail config-download when group:os-apply-config used 2018-01-05 15:58:14 -05:00
i18n.py Update the documentation link for doc migration 2017-07-25 15:00:27 +08:00
inventory.py Add container_cli used for the Overcloud to the Inventory 2019-04-15 10:13:08 +00:00
update.py Handle swift interactions are strings as necessary 2019-03-01 15:45:56 -07:00