diff --git a/defaults/main.yml b/defaults/main.yml index eee17156..8e414f2b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -117,6 +117,9 @@ nova_cell1_name: "cell1" ## Oslo Messaging +# RabbitMQ +nova_oslomsg_heartbeat_in_pthread: "{{ oslomsg_heartbeat_in_pthread | default(_nova_oslomsg_heartbeat_in_pthread) }}" + # RPC nova_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}" nova_oslomsg_rpc_setup_host: "{{ (nova_oslomsg_rpc_host_group in groups) | ternary(groups[nova_oslomsg_rpc_host_group][0], 'localhost') }}" diff --git a/releasenotes/notes/heartbeat-in-pthread-6266b4bad0efa00c.yaml b/releasenotes/notes/heartbeat-in-pthread-6266b4bad0efa00c.yaml new file mode 100644 index 00000000..3782fda0 --- /dev/null +++ b/releasenotes/notes/heartbeat-in-pthread-6266b4bad0efa00c.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/nova.conf.j2 b/templates/nova.conf.j2 index 5897bd46..90800102 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -57,6 +57,10 @@ topics = {{ notification_topics | join(',') }} driver = {{ (notification_topics | length > 0) | ternary('messagingv2', 'noop') }} transport_url = {{ nova_oslomsg_notify_transport }}://{% for host in nova_oslomsg_notify_servers.split(',') %}{{ nova_oslomsg_notify_userid }}:{{ nova_oslomsg_notify_password }}@{{ host }}:{{ nova_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ nova_oslomsg_notify_vhost }}{% if nova_oslomsg_notify_use_ssl | bool %}?ssl=1&ssl_version={{ nova_oslomsg_notify_ssl_version }}&ssl_ca_file={{ nova_oslomsg_notify_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} +# Messaging +[oslo_messaging_rabbit] +heartbeat_in_pthread = {{ nova_oslomsg_heartbeat_in_pthread }} + # Image cache [image_cache] manager_interval = {{ nova_image_cache_manager_interval }} diff --git a/vars/main.yml b/vars/main.yml index cfb8f5b6..459e67fb 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -114,3 +114,5 @@ _qemu_default_conf_dict: |- {{ qemu_dict }} _nova_qemu_conf: "{{ _qemu_default_conf_dict | combine(qemu_conf_dict) }}" + +_nova_oslomsg_heartbeat_in_pthread: "{{ (nova_services['nova-compute']['group'] in group_names) | ternary(False, True) }}"