From 01951cd77b7edfc1008da14c1afd4e260fcf432f Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Fri, 11 Mar 2022 09:28:12 +0000 Subject: [PATCH] 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. Change-Id: I833d72715daff81b64da077e899615b9b2002650 Related-Bug: #1961603 --- defaults/main.yml | 4 ++++ .../notes/heartbeat-in-pthread-9f5fde7bfdd7d306.yaml | 5 +++++ templates/neutron.conf.j2 | 1 + 3 files changed, 10 insertions(+) create mode 100644 releasenotes/notes/heartbeat-in-pthread-9f5fde7bfdd7d306.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 05d7fb36..797ae607 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -229,6 +229,10 @@ neutron_galera_port: "{{ galera_port | default('3306') }}" ### Oslo Messaging ### +# RabbitMQ + +neutron_oslomsg_heartbeat_in_pthread: "{{ oslomsg_heartbeat_in_pthread | default(False) }}" + # RPC neutron_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}" diff --git a/releasenotes/notes/heartbeat-in-pthread-9f5fde7bfdd7d306.yaml b/releasenotes/notes/heartbeat-in-pthread-9f5fde7bfdd7d306.yaml new file mode 100644 index 00000000..3782fda0 --- /dev/null +++ b/releasenotes/notes/heartbeat-in-pthread-9f5fde7bfdd7d306.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes a file descriptor leak which may impact services which use the + oslo.messaging RabbitMQ heartbeat mechanism. diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index 023004d3..b93f4dd0 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -221,6 +221,7 @@ root_helper_daemon = sudo {{ neutron_bin }}/neutron-rootwrap-daemon {{ neutron_c # Messaging [oslo_messaging_rabbit] rpc_conn_pool_size = {{ neutron_rpc_conn_pool_size }} +heartbeat_in_pthread = {{ neutron_oslomsg_heartbeat_in_pthread }} # Notifications [oslo_messaging_notifications]