Bug 1347371

Summary: RFE: Balance Rabbitmq Queue Master Location on queue declaration with min-masters strategy
Product: Red Hat OpenStack Reporter: Marian Krcmarik <mkrcmari>
Component: openstack-tripleo-heat-templatesAssignee: Michele Baldessari <michele>
Status: CLOSED ERRATA QA Contact: Marian Krcmarik <mkrcmari>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: abeekhof, bperkins, dbecker, fdinitto, jschluet, mburns, michele, mlopes, morazi, oblaut, plemenko, rhel-osp-director-maint, royoung
Target Milestone: rcKeywords: FutureFeature, InstallerIntegration, Triaged
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-5.0.0-0.20161008015357.0d3e3e3.1.el7ost Doc Type: Enhancement
Doc Text:
With this enhancement, RabbitMQ introduces the new HA feature of Queue Master distribution. One of the strategies is `min-masters`, which picks the node hosting the minimum number of masters. This was added because of the possibility that one of the controllers may become unavailable, with Queue Masters then located on available controllers during queue declarations. Once the lost controller becomes available again, masters of newly-declared queues are not placed with priority to the controller with an obviously lower number of queue masters, and consequently the distribution may be unbalanced, with one of the controllers under significantly higher load in the event of multiple fail-overs. As a result, this enhancement spreads out the queues across controllers after a controller fail-over.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 15:40:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1384167    

Description Marian Krcmarik 2016-06-16 15:53:41 UTC
Description of problem:
It may happen that one of the controllers may become unvailable and Queue Masters will be located on available controllers during queue declarations. Once lost controller will be become available masters of newly declared queues are not placed  prioritly to such controller with obviously lower number of queue masters and thus the distribution may be unbalanced and one of the controllers may become under significantly higher load in some circumstainces of multiple failovers.

rabbitmq introduced a new HA feature of Queue masters distribution - one of the strategies is min-masters, which picks the node hosting the minimum number of masters.

One of the ways how to turn such min-masters strategy on is by adding following into configuration file - rabbitmq.config
{rabbit,[ .
          .
          {queue_master_locator, <<"min-masters">>},
          .
          . ]},

The other two strategies are Client-Local (default) and Random.

Please consider turning min-masters strategy on in rabbitmq configuration.

Comment 2 Andrew Beekhof 2016-06-28 23:36:42 UTC
The goal of balancing the queues seems like a good one to me.

Chris, can you take care of updating director after validating with Peter that this is the best way to achieve it please?  I'd not expect this option to decrease availability in any way, but best to be sure.

Comment 6 Marian Krcmarik 2016-10-19 20:41:14 UTC
Verified.

$ sudo grep min-masters /etc/rabbitmq/rabbitmq.config
    {queue_master_locator, <<"min-masters">>},

Comment 8 errata-xmlrpc 2016-12-14 15:40:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2948.html