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)
Reviewed: https:/ /review. opendev. org/728057 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=280007c870b 671de9439efba71 fd3916403d15da
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 280007c870b671d e9439efba71fd39 16403d15da
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: config. py heartbeat_ filter has been converted into an instance
nova/
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_
of a new HeartbeatFilter class with its implementation moved
to the filter method.
Change-Id: I642b1e3ed6de2b e4dcc19fe214f84 095d2e1d31a cbe3e16fda0fec5 359faf84c6) db8a945c8f26a07 92bee5e2ed)
Closes-Bug: #1825584
(cherry picked from commit d6f664524dfa4ee
(cherry picked from commit 1caddc4250b4acb