Add configuration option for heartbeat_in_pthread

This configuration option has been observed to result in file
descriptor leaks in certain circumstances. A variable is added
here so that it can be easily overridden.

Related-Bug: #1961603
Change-Id: I8155264b181d6f21728804ef8260979931597427
This commit is contained in:
Andrew Bonney 2022-03-11 09:29:23 +00:00
parent a9eec797b7
commit 6efa45e2bd
4 changed files with 13 additions and 0 deletions

View File

@ -77,6 +77,9 @@ cinder_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time | de
## Oslo Messaging ## Oslo Messaging
# RabbitMQ
cinder_oslomsg_heartbeat_in_pthread: "{{ oslomsg_heartbeat_in_pthread | default(_cinder_oslomsg_heartbeat_in_pthread) }}"
# RPC # RPC
cinder_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}" cinder_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
cinder_oslomsg_rpc_setup_host: "{{ (cinder_oslomsg_rpc_host_group in groups) | ternary(groups[cinder_oslomsg_rpc_host_group][0], 'localhost') }}" cinder_oslomsg_rpc_setup_host: "{{ (cinder_oslomsg_rpc_host_group in groups) | ternary(groups[cinder_oslomsg_rpc_host_group][0], 'localhost') }}"

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes a file descriptor leak which may impact services which use the
oslo.messaging RabbitMQ heartbeat mechanism.

View File

@ -121,6 +121,9 @@ max_pool_size = {{ cinder_db_max_pool_size }}
pool_timeout = {{ cinder_db_pool_timeout }} pool_timeout = {{ cinder_db_pool_timeout }}
connection_recycle_time = {{ cinder_db_connection_recycle_time }} connection_recycle_time = {{ cinder_db_connection_recycle_time }}
[oslo_messaging_rabbit]
heartbeat_in_pthread = {{ cinder_oslomsg_heartbeat_in_pthread }}
[oslo_messaging_notifications] [oslo_messaging_notifications]
driver = {{ (cinder_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }} driver = {{ (cinder_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }}
transport_url = {{ cinder_oslomsg_notify_transport }}://{% for host in cinder_oslomsg_notify_servers.split(',') %}{{ cinder_oslomsg_notify_userid }}:{{ cinder_oslomsg_notify_password }}@{{ host }}:{{ cinder_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ cinder_oslomsg_notify_vhost }}{% if cinder_oslomsg_notify_use_ssl | bool %}?ssl=1&ssl_version={{ cinder_oslomsg_notify_ssl_version }}&ssl_ca_file={{ cinder_oslomsg_notify_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} transport_url = {{ cinder_oslomsg_notify_transport }}://{% for host in cinder_oslomsg_notify_servers.split(',') %}{{ cinder_oslomsg_notify_userid }}:{{ cinder_oslomsg_notify_password }}@{{ host }}:{{ cinder_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ cinder_oslomsg_notify_vhost }}{% if cinder_oslomsg_notify_use_ssl | bool %}?ssl=1&ssl_version={{ cinder_oslomsg_notify_ssl_version }}&ssl_ca_file={{ cinder_oslomsg_notify_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}

View File

@ -119,3 +119,5 @@ cinder_service_catalog:
type: "{{ cinder_service_v3_type }}" type: "{{ cinder_service_v3_type }}"
description: "{{ cinder_service_v3_description }}" description: "{{ cinder_service_v3_description }}"
state: present state: present
_cinder_oslomsg_heartbeat_in_pthread: "{{ (cinder_services['cinder-volume']['group'] in group_names) | ternary(False, True) }}"