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
This commit is contained in:
Alexei Sheplyakov 2015-05-27 17:40:51 +03:00
parent 8693edb138
commit 08a7f41280

View File

@ -47,7 +47,7 @@ mcollective:
libdir: /usr/share/mcollective/plugins libdir: /usr/share/mcollective/plugins
logfile: /var/log/mcollective.log logfile: /var/log/mcollective.log
loglevel: debug loglevel: debug
daemonize: 1 daemonize: 0
direct_addressing: 1 direct_addressing: 1
ttl: 4294957 ttl: 4294957
securityprovider: psk securityprovider: psk
@ -92,9 +92,9 @@ runcmd:
{% endif %} {% endif %}
{% if mcollective.enable != 1 %} {% if mcollective.enable != 1 %}
- /usr/sbin/invoke-rc.d mcollective stop - /usr/sbin/invoke-rc.d mcollective stop
- /usr/sbin/update-rc.d -f mcollective remove - echo manual > /etc/init/mcollective.override
{% else %} {% else %}
- /usr/sbin/update-rc.d mcollective defaults - rm -f /etc/init/mcollective.override
- service mcollective restart - service mcollective restart
{% endif %} {% endif %}
- iptables -t filter -F INPUT - iptables -t filter -F INPUT