From 08a7f41280cde5bba30516288a78dd626e095d69 Mon Sep 17 00:00:00 2001 From: Alexei Sheplyakov Date: Wed, 27 May 2015 17:40:51 +0300 Subject: [PATCH] IBP: configure mcollectived to NOT daemonize on Ubuntu sys v init scripts are inherently racy since creating a PID file takes a while. In particular collectived needs about 0.6 seconds to daemonize itself and create its PID file. If the service gets restarted in this interval the second instance of the daemon gets started without stopping the previous one. Apparently mcollectived gets restarted very often during the final phase of IBP. Hence get rid of sys V init script and use upstart job to manage mcollectived. Merge-After: https://review.fuel-infra.org/7093 Closes-Bug: #1454741 Change-Id: Ie74539a068f33c485573645e6a2f88bd0972b59b --- cloud-init-templates/cloud_config_ubuntu.jinja2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloud-init-templates/cloud_config_ubuntu.jinja2 b/cloud-init-templates/cloud_config_ubuntu.jinja2 index 55ad8e2..61e6758 100644 --- a/cloud-init-templates/cloud_config_ubuntu.jinja2 +++ b/cloud-init-templates/cloud_config_ubuntu.jinja2 @@ -47,7 +47,7 @@ mcollective: libdir: /usr/share/mcollective/plugins logfile: /var/log/mcollective.log loglevel: debug - daemonize: 1 + daemonize: 0 direct_addressing: 1 ttl: 4294957 securityprovider: psk @@ -92,9 +92,9 @@ runcmd: {% endif %} {% if mcollective.enable != 1 %} - /usr/sbin/invoke-rc.d mcollective stop - - /usr/sbin/update-rc.d -f mcollective remove + - echo manual > /etc/init/mcollective.override {% else %} - - /usr/sbin/update-rc.d mcollective defaults + - rm -f /etc/init/mcollective.override - service mcollective restart {% endif %} - iptables -t filter -F INPUT