Remove double tcp_listen_options entries for rabbit
authorMichele Baldessari <michele@acksyn.org>
Wed, 19 Oct 2016 13:02:29 +0000 (15:02 +0200)
committerMichele Baldessari <michele@acksyn.org>
Fri, 21 Oct 2016 05:46:12 +0000 (07:46 +0200)
After a brand new deployment we have the following in rabbitmq.config:
...
  {rabbit, [
    {tcp_listen_options,
         [binary,
         {packet,        raw},
         {reuseaddr,     true},
         {backlog,       128},
         {nodelay,       true},
         {exit_on_close, false}]
    },
    {tcp_listen_options, [binary, {packet, raw}, {reuseaddr, true},
{backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive,
true}]},
...

Let's remove these duplicate entries and make sure that we use the
parameters for the puppet module to set the following values
explicitely (it's the only parameter where we do not use the default
setting from the puppet module):
keepalive = true -> rabbitmq::tcp_keepalive: true

All the other options that we set are the default in the puppet module:
{packet, raw}
{reuseaddr, true}
{backlog, 128}{nodelay, true}
{exit_on_close, false}

Depends-On: I608477d5714a5081b3b4ab3b9fc2932bdd598301
Change-Id: I35921652bd84d1d6be0727051294983d4a0dde10

puppet/services/rabbitmq.yaml

index 5387529..44a09a4 100644 (file)
@@ -71,6 +71,7 @@ outputs:
         rabbitmq::port: '5672'
         rabbitmq::package_source: undef
         rabbitmq::repos_ensure: false
+        rabbitmq::tcp_keepalive: true
         rabbitmq_environment:
           RABBITMQ_NODENAME: "rabbit@%{::hostname}"
           RABBITMQ_SERVER_ERL_ARGS: '"+K true +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"'
@@ -78,7 +79,6 @@ outputs:
           inet_dist_listen_min: '25672'
           inet_dist_listen_max: '25672'
         rabbitmq_config_variables:
-          tcp_listen_options: '[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]'
           cluster_partition_handling: 'pause_minority'
           queue_master_locator: '<<"min-masters">>'
           loopback_users: '[]'