From f95b5845099d2a26c7ad37a25f318ace14e03886 Mon Sep 17 00:00:00 2001 From: Sean Mooney <work@seanmooney.info> Date: Fri, 25 Oct 2024 11:25:39 +0100 Subject: [PATCH] [rabbit] enable quorum queues This change simplfies the oslo_messaging_rabbit config generations by enabling rabbit_quorum_queue and hardcoding heartbeat_in_pthread as false. Closes: OSPRH-9736 Related: OSPRH-10790 --- templates/nova.conf | 18 +++++------------- test/functional/nova_multicell_test.go | 5 +++++ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/templates/nova.conf b/templates/nova.conf index 85b747d5c..0885e15d5 100644 --- a/templates/nova.conf +++ b/templates/nova.conf @@ -55,19 +55,11 @@ key={{.SSLCertificateKeyFile}} lock_path = /var/lib/nova/tmp [oslo_messaging_rabbit] -amqp_durable_queues=false -amqp_auto_delete=false -# we should consider using quorum queues instead -# rabbit_quorum_queue=true -{{/*we might just want to make this always false*/}} -{{ if eq .service_name "nova-api"}} -# We cannot set this to true while is -# https://review.opendev.org/c/openstack/oslo.log/+/852443 is not used in the -# nova-api image otherwise logging from the heartbeat thread will cause hangs. -heartbeat_in_pthread=false -{{else}} -heartbeat_in_pthread=false -{{end}} +amqp_durable_queues = true +rabbit_quorum_queue = true +{{/* heartbeat_in_pthread is known to have several bugs so always set it to flase */}} +heartbeat_in_pthread = false + {{ if eq .service_name "nova-api"}} [oslo_policy] diff --git a/test/functional/nova_multicell_test.go b/test/functional/nova_multicell_test.go index 988798449..f85277c2b 100644 --- a/test/functional/nova_multicell_test.go +++ b/test/functional/nova_multicell_test.go @@ -254,6 +254,8 @@ var _ = Describe("Nova multi cell", func() { novaNames.Namespace, novaNames.Namespace, novaNames.Namespace))) Expect(configData).To(ContainSubstring("transport_url=rabbit://cell0/fake")) + Expect(configData).To(ContainSubstring("rabbit_quorum_queue = true")) + Expect(configData).To(ContainSubstring("heartbeat_in_pthread = false")) SimulateReadyOfNovaTopServices() @@ -382,6 +384,9 @@ var _ = Describe("Nova multi cell", func() { Expect(configData).Should( ContainSubstring("tls_enabled=false")) + Expect(configData).To(ContainSubstring("rabbit_quorum_queue = true")) + Expect(configData).To(ContainSubstring("heartbeat_in_pthread = false")) + myCnf := configDataMap.Data["my.cnf"] Expect(myCnf).To( ContainSubstring("[client]\nssl=0"))