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
(cherry picked from commit 6efa45e2bd)
This commit is contained in:
Andrew Bonney 2022-03-11 09:29:23 +00:00
parent d412e1b701
commit d9c6359b02
4 changed files with 13 additions and 0 deletions

View File

@ -73,6 +73,9 @@ cinder_galera_port: "{{ galera_port | default('3306') }}"
## Oslo Messaging
# RabbitMQ
cinder_oslomsg_heartbeat_in_pthread: "{{ oslomsg_heartbeat_in_pthread | default(_cinder_oslomsg_heartbeat_in_pthread) }}"
# RPC
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') }}"

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

@ -117,6 +117,9 @@ target_helper = {{ cinder_target_helper }}
[database]
connection = mysql+pymysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_password }}@{{ cinder_galera_address }}/{{ cinder_galera_database }}?charset=utf8{% if cinder_galera_use_ssl | bool %}&ssl_ca={{ cinder_galera_ssl_ca_cert }}{% endif %}
[oslo_messaging_rabbit]
heartbeat_in_pthread = {{ cinder_oslomsg_heartbeat_in_pthread }}
[oslo_messaging_notifications]
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 %}

View File

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