Bug 1312962 - rabbitmq configuration in rabbitmq.config is generated with two different tcp_listen_options sections
Summary: rabbitmq configuration in rabbitmq.config is generated with two different tcp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Upstream M3
: 11.0 (Ocata)
Assignee: Michele Baldessari
QA Contact: Udi Shkalim
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-29 16:05 UTC by Marian Krcmarik
Modified: 2017-05-17 19:27 UTC (History)
13 users (show)

Fixed In Version: openstack-tripleo-heat-templates-6.0.0-3
Doc Type: Bug Fix
Doc Text:
The director set the 'tcp_list_options' stanza twice in '/etc/rabbitmq/rabbitmq.config'. This caused no adverse effects but could cause confusion in the future. This fix removes the redundant stanza. Only one 'tcp_list_options' stanza now appears in the configuration file.
Clone Of:
Environment:
Last Closed: 2017-05-17 19:27:35 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1245 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC
OpenStack gerrit 388695 None None None 2016-10-19 13:19:16 UTC

Description Marian Krcmarik 2016-02-29 16:05:57 UTC
Description of problem:
Openstack deployed by OSP-d has on all controller nodes autogenerated config file for rabbitmq with wrong values - specifically It contains tcp_listen_options section twice, first entry without keepalive option enabled and second with keepalived enabled, afaik first entry is only read and set in erlang configs. The goal is to have keepalive enabled which will not happen afaik with configuration generated by OSPd for rabbitmq server.

Example of rabbitmq.config after clean deploy:
% This file managed by Puppet
% Template Path: rabbitmq/templates/rabbitmq.config
[
  {rabbit, [
    {tcp_listen_options,
         [binary,
         {packet,        raw},
         {reuseaddr,     true},
         {backlog,       128},
         {nodelay,       true},
         {exit_on_close, false}]
    },
    {cluster_partition_handling, pause_minority},
    {tcp_listen_options, [binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]},
    {default_user, <<"guest">>},
    {default_pass, <<"guest">>}
  ]},
  {kernel, [
    {inet_dist_listen_max, 35672},
    {inet_dist_listen_min, 35672}
  ]}
,
  {rabbitmq_management, [
    {listener, [
      {port, 15672}
    ]}
  ]}
].

and It should look like for example as:
% This file managed by Puppet
% Template Path: rabbitmq/templates/rabbitmq.config
[
  {rabbit, [
    {tcp_listen_options,
         [binary,
         {packet,        raw},
         {reuseaddr,     true},
         {backlog,       128},
         {nodelay,       true},
         {exit_on_close, false},
         {keepalive,     true}
       ]
    },
    {cluster_partition_handling, pause_minority},
    {default_user, <<"guest">>},
    {default_pass, <<"guest">>}
  ]},
  {kernel, [
    {inet_dist_listen_max, 35672},
    {inet_dist_listen_min, 35672}
  ]}
,
  {rabbitmq_management, [
    {listener, [
      {port, 15672}
    ]}
  ]}
].

Version-Release number of selected component (if applicable):
$ $ rpm -qa | grep tripleo
openstack-tripleo-image-elements-0.9.7-2.el7ost.noarch
openstack-tripleo-heat-templates-kilo-0.8.7-12.el7ost.noarch
openstack-tripleo-puppet-elements-0.0.2-1.el7ost.noarch
openstack-tripleo-heat-templates-0.8.7-12.el7ost.noarch
openstack-tripleo-0.0.7-1.el7ost.noarch
openstack-tripleo-common-0.1.1-1.el7ost.noarch
python-tripleoclient-0.1.1-2.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. grep tcp_listen_options /etc/rabbitmq/rabbitmq.config

Actual results:
2 entries

Expected results:
1 entry

Additional info:

Comment 2 Marian Krcmarik 2016-04-04 11:30:16 UTC
The configuration is not produced as It was the intention causing cluster to have longer recovery time.

Comment 3 Mike Burns 2016-04-07 21:11:06 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 4 Peter Lemenkov 2016-05-23 13:16:00 UTC
Ping, anyone :)
This looks very easy to fix so why keep this open?

Comment 5 Peter Lemenkov 2016-05-31 11:59:50 UTC
Ping, again :)
This looks very easy to fix, so let's just fix it :)

Comment 6 Michele Baldessari 2016-10-12 13:17:22 UTC
So the reason for this bug is the following. In puppet/services/rabbitmq.yaml we have the following:
rabbitmq_config_variables:
  tcp_listen_options: '[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]'


This rabbitmq_config_variables will simply populate the tcp_listen_option option in rabbitmq.config. The problem is that the puppet module for rabbit already contains the logic to set tcp_listen_options. Namely it does the following (templates/rabbitmq.config.erb):
   {tcp_listen_options,
        [binary,
        <%- if @tcp_keepalive -%>
        {keepalive,     true},
        <%- end -%>
        {packet,        raw},
        {reuseaddr,     true},
        <%- if @tcp_backlog -%>
        {backlog,       <%= @tcp_backlog %>},
        <%- end -%>
        <%- if @tcp_sndbuf -%>
        {sndbuf,       <%= @tcp_sndbuf %>},
        <%- end -%>
        <%- if @tcp_recbuf -%>
        {recbuf,       <%= @tcp_recbuf %>},
        <%- end -%>
        {nodelay,       true},
        {linger,        {true, 0}},
        {exit_on_close, false}]
   },


So what we need to verify if we remove that line from rabbitmq.yaml that we set the parameter tcp_sndbuf to 128 and that {linger, {true, 0}} is okay

Comment 9 errata-xmlrpc 2017-05-17 19:27:35 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://access.redhat.com/errata/RHEA-2017:1245


Note You need to log in before you can comment on or make changes to this bug.