From b50241a7b243f553cc35e521ab99bb7f94d8b54a Mon Sep 17 00:00:00 2001 From: Georgy Kibardin Date: Tue, 13 Sep 2016 14:08:34 +0300 Subject: [PATCH] Ignore heartbeats lock fails Stomp heartbeat handling is quite poorly designed. It happens in a separate thread which sleeps, then tries to read a heartbeat if reading mutex is acquired by message receiving thread it fails and increases lock failure count. Upon reaching the limit (in our packets it is 2 by default) it forcibly closes the connetion causing reconnect. Setting the value to 0 turns the feature off. Change-Id: I2187ce69508c530073582c542c963014acc5123a Closes-Bug: #1613246 Closes-Bug: #1298262 --- cloud-init-templates/cloud_config_centos.jinja2 | 1 + cloud-init-templates/cloud_config_fuel_9.0_ubuntu.jinja2 | 1 + cloud-init-templates/cloud_config_ubuntu.jinja2 | 1 + contrib/fuel_bootstrap/files/trusty/etc/mcollective/server.cfg | 1 + contrib/fuel_bootstrap/files/xenial/etc/mcollective/server.cfg | 1 + 5 files changed, 5 insertions(+) diff --git a/cloud-init-templates/cloud_config_centos.jinja2 b/cloud-init-templates/cloud_config_centos.jinja2 index 851d89f5..56156d7a 100644 --- a/cloud-init-templates/cloud_config_centos.jinja2 +++ b/cloud-init-templates/cloud_config_centos.jinja2 @@ -82,6 +82,7 @@ mcollective: plugin.rabbitmq.pool.1.user: {{ mcollective.user }} plugin.rabbitmq.pool.1.password: {{ mcollective.password }} plugin.rabbitmq.heartbeat_interval: 30 + plugin.rabbitmq.max_hbrlck_fails: 0 {% endif %} factsource: yaml plugin.yaml: /etc/mcollective/facts.yaml diff --git a/cloud-init-templates/cloud_config_fuel_9.0_ubuntu.jinja2 b/cloud-init-templates/cloud_config_fuel_9.0_ubuntu.jinja2 index f1a91cc3..b8f475ac 100644 --- a/cloud-init-templates/cloud_config_fuel_9.0_ubuntu.jinja2 +++ b/cloud-init-templates/cloud_config_fuel_9.0_ubuntu.jinja2 @@ -82,6 +82,7 @@ mcollective: plugin.rabbitmq.pool.1.user: {{ mcollective.user }} plugin.rabbitmq.pool.1.password: {{ mcollective.password }} plugin.rabbitmq.heartbeat_interval: 30 + plugin.rabbitmq.max_hbrlck_fails: 0 {% endif %} factsource: yaml plugin.yaml: /etc/mcollective/facts.yaml diff --git a/cloud-init-templates/cloud_config_ubuntu.jinja2 b/cloud-init-templates/cloud_config_ubuntu.jinja2 index 403583f0..efbfb4ab 100644 --- a/cloud-init-templates/cloud_config_ubuntu.jinja2 +++ b/cloud-init-templates/cloud_config_ubuntu.jinja2 @@ -82,6 +82,7 @@ mcollective: plugin.rabbitmq.pool.1.user: {{ mcollective.user }} plugin.rabbitmq.pool.1.password: {{ mcollective.password }} plugin.rabbitmq.heartbeat_interval: 30 + plugin.rabbitmq.max_hbrlck_fails: 0 {% endif %} factsource: yaml plugin.yaml: /etc/mcollective/facts.yaml diff --git a/contrib/fuel_bootstrap/files/trusty/etc/mcollective/server.cfg b/contrib/fuel_bootstrap/files/trusty/etc/mcollective/server.cfg index 75887d8b..92472e08 100644 --- a/contrib/fuel_bootstrap/files/trusty/etc/mcollective/server.cfg +++ b/contrib/fuel_bootstrap/files/trusty/etc/mcollective/server.cfg @@ -21,6 +21,7 @@ plugin.rabbitmq.pool.1.port = 61613 plugin.rabbitmq.pool.1.user = mcollective plugin.rabbitmq.pool.1.password = marionette plugin.rabbitmq.heartbeat_interval = 30 +plugin.rabbitmq.max_hbrlck_fails = 0 # Facts factsource = yaml diff --git a/contrib/fuel_bootstrap/files/xenial/etc/mcollective/server.cfg b/contrib/fuel_bootstrap/files/xenial/etc/mcollective/server.cfg index 54942518..8b2a4597 100644 --- a/contrib/fuel_bootstrap/files/xenial/etc/mcollective/server.cfg +++ b/contrib/fuel_bootstrap/files/xenial/etc/mcollective/server.cfg @@ -21,6 +21,7 @@ plugin.rabbitmq.pool.1.port = 61613 plugin.rabbitmq.pool.1.user = mcollective plugin.rabbitmq.pool.1.password = marionette plugin.rabbitmq.heartbeat_interval = 30 +plugin.rabbitmq.max_hbrlck_fails = 0 # Facts factsource = yaml