queue TTL pattern does not match intended queues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack RabbitMQ Server Charm |
Fix Committed
|
High
|
Edward Hope-Morley | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This PR adds the ability for charms to set an expiry policy on queues:
https:/
This is especially useful for heat, where restating the service will leave behind old queues, making the count grow considerably over time. However, the pattern used is enclosed in double quotes, and rabbitmq treats the quotes as part of the pattern, which means it will never match. Here is the policy created in rabbitmq:
# rabbitmqctl list_policies -p openstack
Listing policies for vhost "openstack" ...
vhost name pattern apply-to definition priority
openstack HA ^(?!amq\.).* all {"ha-mode"
openstack heat_expiry "heat-engine-
openstack TTL ^(versioned_
Notice the quotes surrounding the pattern:
"heat-
The following diff, makes it work as intended:
diff --git a/hooks/
index f1594c5..be8968a 100644
--- a/hooks/
+++ b/hooks/
@@ -443,7 +443,7 @@ def configure_
return
rabbitmqct
- '"{ttlreg}
+ '{ttlreg}
confirmed problem exists on master branch and that this change fixes it