Bug 1312962 - rabbitmq configuration in rabbitmq.config is generated with two different tcp_listen_options sections
rabbitmq configuration in rabbitmq.config is generated with two different tcp...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
medium Severity medium
: Upstream M3
: 11.0 (Ocata)
Assigned To: Michele Baldessari
Udi Shkalim
: InstallerIntegration, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-29 11:05 EST by Marian Krcmarik
Modified: 2017-05-17 15:27 EDT (History)
13 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-17 15:27:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 388695 None None None 2016-10-19 09:19 EDT
Red Hat Product Errata RHEA-2017:1245 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 19:01:50 EDT

  None (edit)
Description Marian Krcmarik 2016-02-29 11:05:57 EST
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 07:30:16 EDT
The configuration is not produced as It was the intention causing cluster to have longer recovery time.
Comment 3 Mike Burns 2016-04-07 17:11:06 EDT
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.
Comment 4 Peter Lemenkov 2016-05-23 09:16:00 EDT
Ping, anyone :)
This looks very easy to fix so why keep this open?
Comment 5 Peter Lemenkov 2016-05-31 07:59:50 EDT
Ping, again :)
This looks very easy to fix, so let's just fix it :)
Comment 6 Michele Baldessari 2016-10-12 09:17:22 EDT
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 15:27:35 EDT
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.