From 6baa7827ce5b40ae2310e77b6c5d47270dbe9c4c Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Sat, 25 May 2024 13:28:30 +0200 Subject: [PATCH] Define unique hostname for QManager Due to the shortcoming of QManager implementation [1], in case of uWSGI usage on metal hosts, the flow ends up with having the same hostname/processname set, making services to fight over same file under SHM. In order to avoid this, we prepend the hostname with a service_name. We can not change processname instead, since it will lead to the fight between different processes of the same service. [1] https://bugs.launchpad.net/oslo.messaging/+bug/2065922 Change-Id: Idfe3a93727c3ba7f05589d4113233e999c99d398 --- templates/glance-api.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/glance-api.conf.j2 b/templates/glance-api.conf.j2 index 0a667fc6..09fdcdfe 100644 --- a/templates/glance-api.conf.j2 +++ b/templates/glance-api.conf.j2 @@ -82,6 +82,9 @@ rabbit_quorum_queue = {{ glance_oslomsg_rabbit_quorum_queues }} rabbit_transient_quorum_queue = {{ glance_oslomsg_rabbit_transient_quorum_queues }} rabbit_qos_prefetch_count = {{ glance_oslomsg_rabbit_qos_prefetch_count }} use_queue_manager = {{ glance_oslomsg_rabbit_queue_manager }} +{% if glance_oslomsg_rabbit_queue_manager %} +hostname = {{ [ansible_facts['hostname'], glance_service_name] | join('-') }} +{% endif %} rabbit_stream_fanout = {{ glance_oslomsg_rabbit_stream_fanout }} rabbit_quorum_delivery_limit = {{ glance_oslomsg_rabbit_quorum_delivery_limit }} rabbit_quorum_max_memory_bytes = {{ glance_oslomsg_rabbit_quorum_max_memory_bytes }}