Comment 4 for bug 1826281

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/656901
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=2e54cff0db213494d07c72ce0f36d60831d2e84d
Submitter: Zuul
Branch: master

commit 2e54cff0db213494d07c72ce0f36d60831d2e84d
Author: Michele Baldessari <email address hidden>
Date: Thu May 2 23:20:48 2019 +0200

    Use oslo_rootwrap subprocess module in order to gain proper eventlet awareness

    Via https://github.com/openstack/oslo.rootwrap/commit/31cfdbd4076bb6556cf9612171ba43fa44475d71
    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 <email address hidden>
    Co-Authored-By: HervĂ© Beraud <email address hidden>

    Closes-Bug: #1826281

    Change-Id: Id22b1465d6d2424d90781983b970aba4545feb8a