<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.E-MailFormatvorlage20
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Albert,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">TL;DR: you set durable on your openstack service, not on rabbitmq. It is the same for all queues, so either you make them all HA or none of them (at least afaik).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">the „durable“ setting is not defined by the policy but by the client that declares the queue. Openstack normally uses the following setting for that:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">[oslo_messaging_rabbit]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">amqp_durable_queues = true<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">AFAIK this is a global setting and not different for notifications vs. other queues.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">An exception of this is fanout/reply queues which are always non-durable.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">The whole durable/HA thing can be summarized as follows<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Durable: If true then the message will survive the crash/restart of a rabbitmq nodes. If false the message is lost on crash/restart. Set by the client declaring the queue<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">HA-mode: If enabled the queue is replicated across multiple nodes. If disabled only a single node hosts the queue and all messages. Set by the policy on rabbitmq<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">And the following are the result of restarts of a single node in each of the combinations:<o:p></o:p></span></p>
<table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td width="209" valign="top" style="width:156.6pt;border:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
</td>
<td width="209" valign="top" style="width:156.6pt;border:solid windowtext 1.0pt;border-left:none;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Durable<o:p></o:p></span></p>
</td>
<td width="209" valign="top" style="width:156.6pt;border:solid windowtext 1.0pt;border-left:none;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Non-durable<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="209" valign="top" style="width:156.6pt;border:solid windowtext 1.0pt;border-top:none;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">HA<o:p></o:p></span></p>
</td>
<td width="209" valign="top" style="width:156.6pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Queue is failing over to another node. All messages are preserved<o:p></o:p></span></p>
</td>
<td width="209" valign="top" style="width:156.6pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">DO NOT DO THIS. The queue should fail over to another node, but the other node does not have any message. This does not make sense and causes all kind of strange rabbitmq issues.<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="209" valign="top" style="width:156.6pt;border:solid windowtext 1.0pt;border-top:none;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Non-HA<o:p></o:p></span></p>
</td>
<td width="209" valign="top" style="width:156.6pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Queue is unavailable (no reads or writes) until the single node comes back. All messages are preserved.<o:p></o:p></span></p>
</td>
<td width="209" valign="top" style="width:156.6pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Queue is deleted and all messages are lost. It can be redeclared on another node while the first one is down.<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A">Best Regards<br>
<br>
Felix Hüttner<br>
Schwarz IT KG * Stiftsbergstraße 1 * D-74172 Neckarsulm</span><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Albert Braden <ozzzo@yahoo.com> <br>
<b>Sent:</b> Friday, March 18, 2022 9:50 PM<br>
<b>To:</b> Openstack-discuss <openstack-discuss@lists.openstack.org>; Felix Hüttner <felix.huettner@mail.schwarz><br>
<b>Subject:</b> Re: [kolla] [rabbitmq] RMQ trouble after config update<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I fixed the typo and redeployed. The filter now reads:<br>
<br>
{"vhost": "/", "name": "ha-all", "pattern": "^(?!(amq\.)|(.*_fanout_)|(reply_)|(notifications_designate)|(versioned_notifications)).*", "apply-to": "all", "definition": {"ha-mode":"all","ha-promote-on-shutdown": "always", "ha-sync-mode":"automatic"}, "priority":0}
]<br>
<br>
I also tried deleting the RMQ containers and volumes and then redeploying, and deleting the queues and their exchanges, but they are re-created durable.<o:p></o:p></p>
</div>
<div style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:7.5pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A">On Friday, March 18, 2022, 04:22:17 PM EDT, Albert Braden <<a href="mailto:ozzzo@yahoo.com">ozzzo@yahoo.com</a>> wrote:
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A"><o:p> </o:p></span></p>
</div>
<div>
<div id="yiv9185830092">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A">I did not intend to make the notifications_designate queues HA nor durable. It<br>
appears that those two queues are treated differently from the others that I<br>
didn't specify as HA. For example, if I look at one of the _fanout queues, it<br>
is not durable:<br>
<br>
Features<br>
x-expires: 1800000<br>
Policy<br>
Operator policy<br>
Effective policy definition<br>
Node rabbit@de6-ctrl2<br>
<br>
I tried adding the notifications_designate queues to the exclusion list:<br>
<br>
{"vhost": "/", "name": "ha-all", "pattern":<br>
"^(?!(amq\.)|(.*_fanout_)|(reply_)(notifications_designate)|(versioned_notifications)).*",<br>
"apply-to": "all", "definition": {"ha-mode":"all","ha-promote-on-shutdown":<br>
"always", "ha-sync<br>
<br>
But this doesn't seem to make a difference. The notifications_designate queues<br>
still have " Features: durable: true"<br>
<br>
How can I make the notifications_designate queues non-durable? <o:p></o:p></span></p>
</div>
<div style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:7.5pt">
<div>
<div id="yiv9185830092yqtfd37171">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A">On Friday, March 18, 2022, 10:04:08 AM EDT, Felix Hüttner <<a href="mailto:felix.huettner@mail.schwarz">felix.huettner@mail.schwarz</a>> wrote:
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A">Hi Albert,<br>
<br>
for the queue "notifications_designate.info" both the "notifications-expire" and the "ha-all" policy would match with their pattern. However only one policy can be applied to a queue at any given point in time. I assume "notifications-expire" is applied (but
you can check that easily in the UI or with "rabbitmqctl list_queues name policy").<br>
<br>
In this case the "notifications_designate.info" is created as durable (because of amqp_durable_queues) and non-ha (as the policy does not define ha).<br>
When a node with a durable and non-ha queue goes down then this queue no longer useable until either the node comes back or the queue is deleted.<br>
<br>
In your case I would assume that you also want this queue to be HA, so you probably need to set the options of the "ha-all" policy also in the "notifications-expire" policy.<br>
<br>
Regarding the last point of the queue being on ctrl2 and you connecting to ctrl1 this is normal rabbitmq behaviour in that it will forward messages to other nodes if needed.<br>
<br>
Best Regards<br>
<br>
Felix Hüttner<br>
Schwarz IT KG * Stiftsbergstraße 1 * D-74172 Neckarsulm<o:p></o:p></span></p>
<div id="yiv9185830092yqtfd61668">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A"><br>
-----Original Message-----<br>
From: Albert Braden <<a href="mailto:ozzzo@yahoo.com" target="_blank">ozzzo@yahoo.com</a>><br>
Sent: Friday, March 18, 2022 1:54 PM<br>
To: Openstack-discuss <<a href="mailto:openstack-discuss@lists.openstack.org" target="_blank">openstack-discuss@lists.openstack.org</a>><br>
Subject: [kolla] [rabbitmq] RMQ trouble after config update<br>
<br>
We're running kolla-ansible Train. I followed the recommendations in [1] and ended up with the following config:<br>
<br>
definitions.json (in the rabbitmq container):<br>
<br>
{<br>
"vhosts": [<br>
{"name": "/"} ],<br>
"users": [<br>
{"name": "openstack", "password": "<password>", "tags": "administrator"} ],<br>
"permissions": [<br>
{"user": "openstack", "vhost": "/", "configure": ".*", "write": ".*", "read": ".*"} ],<br>
"policies":[<br>
{"vhost": "/", "name": "notifications-expire", "pattern": "^(notifications_designate|versioned_notifications).*", "apply-to": "queues", "definition": {"message-ttl":600000,"expires":1200000}, "priority":0},<br>
{"vhost": "/", "name": "ha-all", "pattern": "^(?!(amq\.)|(.*_fanout_)|(reply_)).*", "apply-to": "all", "definition": {"ha-mode":"all","ha-promote-on-shutdown": "always", "ha-sync-mode":"automatic"}, "priority":0} ] }<br>
<br>
etc/kolla/config/global.conf:<br>
<br>
[oslo_messaging_rabbit]<br>
amqp_durable_queues = True<br>
<br>
This fixed some issues, but we seem to have a new issue so I must be missing a setting. When we stop the RMQ container on ctrl1, designate stops working (DNS records are not created nor deleted) and I see this in designate-sink.log:<br>
<br>
2022-03-17 19:21:29.261 28 ERROR oslo.messaging._drivers.impl_rabbit [req-2c0cd9f4-5331-4697-9c3e-eece475a52af - - - - -] Failed to consume message from queue: Queue.declare: (404) NOT_FOUND - home node '<a href="mailto:rabbit@de6-ctrl1" target="_blank">rabbit@de6-ctrl1</a>'
of durable queue 'notifications_designate.info' in vhost '/' is down or inaccessible: amqp.exceptions.NotFound: Queue.declare: (404) NOT_FOUND - home node '<a href="mailto:rabbit@de6-ctrl1" target="_blank">rabbit@de6-ctrl1</a>' of durable queue 'notifications_designate.info'
in vhost '/' is down or inaccessible<br>
<br>
When I look at the notifications_designate.info queue in the web interface, it appears to have moved to ctrl2:<br>
<br>
Features<br>
durable: true<br>
Policy notifications-expire<br>
Operator policy<br>
Effective policy definition<br>
expires: 1200000<br>
message-ttl: 600000<br>
Node <a href="mailto:rabbit@qde3-ctrl2" target="_blank">rabbit@qde3-ctrl2</a><br>
<br>
When I look at designate.conf in the designate_sink containers I don't see anything pointing only to ctrl1:<br>
<br>
transport_url = rabbit://openstack:<pwd>@<ctrl1>:5672,openstack:<pwd>@<ctrl2>:5672,openstack:<pwd>@<ctrl3>:5672//<br>
<br>
But it appears that Designate still tries to use the queue on ctrl1. After I bring up ctrl1, the notifications_designate.info queue remains on ctrl2, but Designate starts working.<br>
<br>
What am I missing?<br>
<br>
[1] <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A"><a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.openstack.org%2Fwiki%2FLarge_Scale_Configuration_Rabbit&data=04%7C01%7C%7Ca44639612f0048ec107208da0920eabd%7Cd04f47175a6e4b98b3f96918e0385f4c%7C0%7C0%7C637832334244057512%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=MvODUG8xnlxoXHZIwYes3acbS5sZorSKTTmTHXtm5mQ%3D&reserved=0" target="_blank">https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.openstack.org%2Fwiki%2FLarge_Scale_Configuration_Rabbit&data=04%7C01%7C%7C103b79868a61424923bb08da08df82f7%7Cd04f47175a6e4b98b3f96918e0385f4c%7C0%7C0%7C637832053312648154%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1RIlfljNyKg71IrZc0NIuqDoHPkTGtSBthadz%2Bneofk%3D&reserved=0</a><br>
<br>
Diese E Mail enthält möglicherweise vertrauliche Inhalte und ist nur für die Verwertung durch den vorgesehenen Empfänger bestimmt. Sollten Sie nicht der vorgesehene Empfänger sein, setzen Sie den Absender bitte unverzüglich in Kenntnis und löschen diese E Mail.
Hinweise zum Datenschutz finden Sie hier<<a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.datenschutz.schwarz%2F&data=04%7C01%7C%7Ca44639612f0048ec107208da0920eabd%7Cd04f47175a6e4b98b3f96918e0385f4c%7C0%7C0%7C637832334244213646%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=j7bKXsxGWxgMPUMPAQAs7q6RvoFjZP6qy4Vp5kBriAE%3D&reserved=0" target="_blank">https://www.datenschutz.schwarz</a><o:p></o:p></span></p>
<div id="yiv9185830092yqtfd33885">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A">>.<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p style="font-family:Calibri;font-size:11pt">Diese E Mail enthält möglicherweise vertrauliche Inhalte und ist nur für die Verwertung durch den vorgesehenen Empfänger bestimmt. Sollten Sie nicht der vorgesehene Empfänger sein, setzen Sie den Absender bitte
unverzüglich in Kenntnis und löschen diese E Mail. Hinweise zum Datenschutz finden Sie
<a href="https://www.datenschutz.schwarz">hier</a>.</p>
</body>
</html>