Fix the init script so mcollective can be restarted properly 49/2749/1
authorAlexei Sheplyakov <asheplyakov@mirantis.com>
Thu, 29 Jan 2015 11:08:24 +0000 (14:08 +0300)
committerAlexei Sheplyakov <asheplyakov@mirantis.com>
Thu, 29 Jan 2015 11:08:42 +0000 (14:08 +0300)
commitd3cac30b312dd7c6f5425be4a4bdb0d30d52ceed
treeb9ed6b24350f7e64b260ec7d8ca2f1999c51e8e2
parentc9588041799f119a2d5cbeef5958c4e88c1d23e6
Fix the init script so mcollective can be restarted properly

The check for a running mcollective process is totally wrong and fails
to handle a stale pid file:

if [ -f $(cat /proc/$(cat $pidfile)/exe > /dev/null) ] ; then

Basically it's

if [ -f ]; then echo "Someone can't write shell scripts"; fi

This error breaks image based deployment. During the first boot after
the image based provisioning cloud init reconfigures mcollective to use
rabbitmq for communication and restarts it. However the restart gets
suppressed due to a bug in the sysv-style init script, so OpenStack
deployment does not start (and eventually times out).

The error is non-deterministic since sometimes cloud-init manages to
configure mcollective before it actually gets started (thus the correct
configuration is used despite the skipped restart).

Related-Bug: #1407634
Change-Id: I1608492ff807a1662fa1453c6e50d9fb4eb234bd
debian/changelog
debian/mcollective.init
mcollective.init [changed mode: 0644->0755]