summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlawek Kaplonski <skaplons@redhat.com>2022-08-05 12:40:40 +0200
committerSlawek Kaplonski <skaplons@redhat.com>2022-08-16 14:14:29 +0000
commite44f286ebca0fbde5eae2f7eb9a21ba55ba2a549 (patch)
tree8f908b4a194d02bf4f5e162c6bce72285ca41871
parent41863867489c8a84823f2b3d73cab5585f1fb4ae (diff)
downloadoslo-messaging-e44f286ebca0fbde5eae2f7eb9a21ba55ba2a549.tar.gz
Change default value of "heartbeat_in_pthread" to False14.0.0
As was reported in the related bug some time ago, setting that option to True for nova-compute can break it as it's non-wsgi service. We also noticed same problems with randomly stucked non-wsgi services like e.g. neutron agents and probably the same issue can happen with any other non-wsgi service. To avoid that this patch changes default value of that config option to be False. Together with [1] it effectively reverts change done in [2] some time ago. [1] https://review.opendev.org/c/openstack/oslo.messaging/+/800621 [2] https://review.opendev.org/c/openstack/oslo.messaging/+/747395 Related-Bug: #1934937 Closes-Bug: #1961402 Change-Id: I85f5b9d1b5d15ad61a9fcd6e25925b7eeb8bf6e7
-rw-r--r--oslo_messaging/_drivers/impl_rabbit.py6
-rw-r--r--releasenotes/notes/do-not-run-heartbeat-in-pthread-by-default-42e1299f59b841f8.yaml9
2 files changed, 13 insertions, 2 deletions
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py
index ed2642c..4660762 100644
--- a/oslo_messaging/_drivers/impl_rabbit.py
+++ b/oslo_messaging/_drivers/impl_rabbit.py
@@ -92,7 +92,7 @@ rabbit_opts = [
'executable used does not support OpenSSL FIPS mode, '
'an exception will be raised.'),
cfg.BoolOpt('heartbeat_in_pthread',
- default=True,
+ default=False,
help="Run the health check heartbeat thread "
"through a native python thread by default. If this "
"option is equal to False then the health check "
@@ -100,7 +100,9 @@ rabbit_opts = [
"from the parent process. For "
"example if the parent process has monkey patched the "
"stdlib by using eventlet/greenlet then the heartbeat "
- "will be run through a green thread.",
+ "will be run through a green thread. "
+ "This option should be set to True only for the "
+ "wsgi services.",
),
cfg.FloatOpt('kombu_reconnect_delay',
default=1.0,
diff --git a/releasenotes/notes/do-not-run-heartbeat-in-pthread-by-default-42e1299f59b841f8.yaml b/releasenotes/notes/do-not-run-heartbeat-in-pthread-by-default-42e1299f59b841f8.yaml
new file mode 100644
index 0000000..265e709
--- /dev/null
+++ b/releasenotes/notes/do-not-run-heartbeat-in-pthread-by-default-42e1299f59b841f8.yaml
@@ -0,0 +1,9 @@
+---
+upgrade:
+ - |
+ The ``[oslo_messaging_rabbit] heartbeat_in_pthread`` config option
+ defaults to ``False`` again.
+ For wsgi applications it is recommended to set this value to ``True``
+ but enabling it for non-wsgi services may break such service.
+ Please check https://bugs.launchpad.net/oslo.messaging/+bug/1934937
+ for more details.