Comment 22 for bug 1825584

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/train)

Reviewed: https://review.opendev.org/728057
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=280007c870b671de9439efba71fd3916403d15da
Submitter: Zuul
Branch: stable/train

commit 280007c870b671de9439efba71fd3916403d15da
Author: Sean Mooney <email address hidden>
Date: Tue Apr 28 23:20:16 2020 +0100

    Silence amqp heartbeat warning

    When the nova api is executing under uWSGI or MOD_WSGI
    the lifetime of the amqp heartbeat thread is controlled
    by the wsgi server. As a result when the nova api is run
    in this configuration we expect that the heartbeat thread
    will be suspended and heartbeats will be missed when the wsgi
    server suspends execution of the wsgi application.

    This change adds a python logging filter to suppress
    the reporting of heartbeat warnings as this behavior is
    expected. Since the operator cannot do anything to address
    the issue the warning is just noise and many operators
    and customers find it to be off-putting.

    Changes:
      nova/config.py
    in python 3 log filters can simply be a function that
    returns true or false and accepts single argument which
    is the record to filter. To support python 2 the
    rabbit_heartbeat_filter has been converted into an instance
    of a new HeartbeatFilter class with its implementation moved
    to the filter method.

    Change-Id: I642b1e3ed6de2be4dcc19fe214f84095d2e1d31a
    Closes-Bug: #1825584
    (cherry picked from commit d6f664524dfa4eecbe3e16fda0fec5359faf84c6)
    (cherry picked from commit 1caddc4250b4acbdb8a945c8f26a0792bee5e2ed)