Skip to content

Commit

Permalink
[rabbit] enable quorum queues
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SeanMooney committed Oct 25, 2024
1 parent e24a659 commit f95b584
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
18 changes: 5 additions & 13 deletions templates/nova.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 5 additions & 0 deletions test/functional/nova_multicell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit f95b584

Please sign in to comment.