<div dir="ltr"><div>In the meantime, I'm using this horrendous script inside compute nodes to check for rabbitmq connectivity. It uses the 'set_host_enabled' rpc call, which in my case is innocuous. </div><div><br></div><div>#!/bin/bash</div><div>UUID=$(cat /proc/sys/kernel/random/uuid)</div><div>RABBIT=$(grep -Po '(?<=rabbit_host = ).+' /etc/nova/nova.conf)</div><div>HOSTX=$(hostname)</div><div>python -c "</div><div>import pika</div><div>connection = pika.BlockingConnection(pika.ConnectionParameters(\"$RABBIT\"))</div><div>channel = connection.channel()</div><div>channel.basic_publish(exchange='nova', routing_key=\"compute.$HOSTX\", properties=pika.BasicProperties(content_type = 'application/json'),</div><div> body = '{ \"version\": \"3.0\", \"_context_request_id\": \"$UUID\", \\</div><div> \"_context_roles\": [\"KeystoneAdmin\", \"KeystoneServiceAdmin\", \"admin\"], \\</div><div> \"_context_user_id\": \"XXX\", \\</div><div> \"_context_project_id\": \"XXX\", \\</div><div> \"method\": \"set_host_enabled\", \\</div><div> \"args\": {\"enabled\": true} \\</div><div> }'</div><div>)</div><div>connection.close()"</div><div>sleep 2</div><div>tail -1000 /var/log/nova/nova-compute.log | grep -q $UUID || { echo "WARNING: nova-compute not consuming RabbitMQ messages. Last message: $UUID"; exit 1; }</div><div>echo "OK"</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 15, 2015 at 9:48 PM, Sam Morrison <span dir="ltr"><<a href="mailto:sorrison@gmail.com" target="_blank">sorrison@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">We’ve had a lot of issues with Icehouse related to rabbitMQ. Basically the change from openstack.rpc to oslo.messaging broke things. These things are now fixed in oslo.messaging version 1.5.1, there is still an issue with heartbeats and that patch is making it’s way through review process now.<div><br></div><div><a href="https://review.openstack.org/#/c/146047/" target="_blank">https://review.openstack.org/#/c/146047/</a></div><div><br></div><div>Cheers,</div><div>Sam</div><div><div class="h5"><div><br></div><div><br></div><div><div><blockquote type="cite"><div>On 16 Jan 2015, at 10:55 am, sridhar basam <<a href="mailto:sridhar.basam@gmail.com" target="_blank">sridhar.basam@gmail.com</a>> wrote:</div><br><div><p dir="ltr"><br>
If you are using ha queues, use a version of rabbitmq > 3.3.0. There was a change in that version where consumption on queues was automatically enabled when a master election for a queue happened. Previous versions only informed clients that they had to reconsume on a queue. It was the clients responsibility to start consumption on a queue.</p><p dir="ltr"> Make sure you enable tcp keepalives to a low enough value in case you have a firewall device in between your rabbit server and it's consumers.</p><p dir="ltr">Monitor consumers on your rabbit infrastructure using 'rabbitmqctl list_queues name messages consumers'. Consumers on fanout queues is going to depend on the number of services of any type you have in your environment.</p><p dir="ltr"> Sri<br>
</p>
<div class="gmail_quote">On Jan 15, 2015 6:27 PM, "Michael Dorman" <<a href="mailto:mdorman@godaddy.com" target="_blank">mdorman@godaddy.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>
<div>Here is the bug I’ve been tracking related to this for a while. I haven’t really kept up to speed with it, so I don’t know the current status.</div>
<div><br>
</div>
<div><a href="https://bugs.launchpad.net/nova/+bug/856764" target="_blank">https://bugs.launchpad.net/nova/+bug/856764</a></div>
<div><br>
</div>
<div>
<div></div>
</div>
</div>
</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:12pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Kris Lindgren <<a href="mailto:klindgren@godaddy.com" target="_blank">klindgren@godaddy.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, January 15, 2015 at 12:10 PM<br>
<span style="font-weight:bold">To: </span>Gustavo Randich <<a href="mailto:gustavo.randich@gmail.com" target="_blank">gustavo.randich@gmail.com</a>>, OpenStack Operators <<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Openstack-operators] Way to check compute <-> rabbitmq connectivity<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>During the Atlanta ops meeting this topic came up and I specifically mentioned about adding a "no-op" or healthcheck ping to the rabbitmq stuff to both nova & neutron. The dev's in the room looked at me like I was crazy, but it was so that we could exactly
catch issues as you described. I am also interested if any one knows of a lightweight call that could be used to verify/confirm rabbitmq connectivity as well. I haven't been able to devote time to dig into it. Mainly because if one client is having issues
- you will notice other clients are having similar/silent errors and a restart of all the things is the easiest way to fix, for us atleast.</div>
<div>
<div>
<div>____________________________________________</div>
<div> </div>
<div>Kris Lindgren</div>
<div>Senior Linux Systems Engineer</div>
<div>GoDaddy, LLC.</div>
</div>
<div><br>
</div>
</div>
</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Gustavo Randich <<a href="mailto:gustavo.randich@gmail.com" target="_blank">gustavo.randich@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, January 15, 2015 at 11:53 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a>" <<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Openstack-operators] Way to check compute <-> rabbitmq connectivity<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>
<div>Just to add one more background scenario, we also had similar problems trying to load balance rabbitmq via F5 Big IP LTM. For that reason we don't use it now. Our installation is a single rabbitmq instance and no intermediaries (albeit network switches).
We use Folsom and Icehouse, the problem being perceived more in Icehouse nodes.<br>
<br>
</div>
We are already monitoring message queue size, but we would like to pinpoint in semi-realtime the specific hosts/racks/network paths experiencing the "stale connection" before a user complains about an operation being stuck, or even hosts with no such pending
operations but already "disconnected" -- we also could diagnose possible network causes and avoid massive service restarting.<br>
<br>
</div>
<div>So, for now, if someone knows about a cheap and quick openstack operation that triggers a message interchange between rabbitmq and nova-compute and a way of checking the result it would be great.<br>
<br>
<br>
</div>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 15, 2015 at 1:45 PM, Kris G. Lindgren <span dir="ltr">
<<a href="mailto:klindgren@godaddy.com" target="_blank">klindgren@godaddy.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>We did have an issue using celery on an internal application that we wrote - but I believe it was fixed after much failover testing and code changes. We also use logstash via rabbitmq and haven't noticed any issues there either.</div>
<div><br>
</div>
<div>So this seems to be just openstack/oslo related.</div>
<div><br>
</div>
<div>We have tried a number of different configurations - all of them had their issues. We started out listing all the members in the cluster on the rabbit_hosts line. This worked most of the time without issue, until we would restart one of the servers,
then it seemed like the clients wouldn't figure out they were disconnected and reconnect to the next host. </div>
<div><br>
</div>
<div>In an attempt to solve that we moved to using harpoxy to present a vip that we configured in the rabbit_hosts line. This created issues with long lived connections disconnects and a bunch of other issues. In our production environment we moved to load
balanced rabbitmq, but using a real loadbalancer, and don’t have the weird disconnect issues. However, anytime we reboot/take down a rabbitmq host or pull a member from the cluster we have issues, or if their is a network disruption we also have issues.</div>
<div><br>
</div>
<div>Thinking the best course of action is to move rabbitmq off on to its own box and to leave it alone.</div>
<div><br>
</div>
<div>Does anyone have a rabbitmq setup that works well and doesn’t have random issues when pulling nodes for maintenance?</div>
<span>
<div>
<div>
<div>____________________________________________</div>
<div> </div>
<div>Kris Lindgren</div>
<div>Senior Linux Systems Engineer</div>
<div>GoDaddy, LLC.</div>
</div>
<div><br>
</div>
</div>
</span></div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Joe Topjian <<a href="mailto:joe@topjian.net" target="_blank">joe@topjian.net</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, January 15, 2015 at 9:29 AM<br>
<span style="font-weight:bold">To: </span>"Kris G. Lindgren" <<a href="mailto:klindgren@godaddy.com" target="_blank">klindgren@godaddy.com</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a>" <<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Openstack-operators] Way to check compute <-> rabbitmq connectivity<br>
</div>
<div>
<div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi Kris,
<div><br>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>
<div> Our experience is pretty much the same on anything that is using rabbitmq - not just nova-compute. </div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Just to clarify: have you experienced this outside of OpenStack (or Oslo)? </div>
<div><br>
</div>
<div>We've seen similar issues with rabbitmq and OpenStack. We used to run rabbit through haproxy and tried a myriad of options like setting no timeouts, very very long timeouts, etc, but would always eventually see similar issues as described.</div>
<div><br>
</div>
<div>Last month, we reconfigured all OpenStack components to use the `rabbit_hosts` option with all nodes in our cluster listed. So far this has worked well, though I probably just jinxed myself. :)</div>
<div><br>
</div>
<div>We still have other services (like Sensu) using the same rabbitmq cluster and accessing it through haproxy. We've never had any issues there.</div>
<div><br>
</div>
<div>What's also strange is that I have another OpenStack deployment (from Folsom to Icehouse) with just a single rabbitmq server installed directly on the cloud controller (meaning: no nova-compute). I never have any rabbit issues in that cloud. </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
<br>
_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span></div>
</div>
</span>
</div>
<br>_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
<br></blockquote></div>
_______________________________________________<br>OpenStack-operators mailing list<br><a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br></div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
<br></blockquote></div><br></div>