Comment 2 for bug 1455489

Revision history for this message
Vladimir Kozhukalov (kozhukalov) wrote : Re: Cloud-init must restart mcollective after configuring

The problem has many faces.
1) default mcollective config has daemonize=1 option and our current init script assumes mcollective does not go background. So when SysV first time starts mcollective with default config, the pid becomes wrong (contains wrong process number). Then when cloud-init runs 'service mcollective start', init script thinks process is not running and starts it again but with daemonize=0. We need to fix init script. https://bugs.launchpad.net/fuel/+bug/1454741 But when we fix it, mcollective will not be restarted by cloud-init. Fortunately, nailgun-agent will restart it later.
2) When nailgun-agent starts it checks if identity setting is defined in mcollective config. If it is not defined, nailgun-agent appends it and restarts mcollective. But sometimes it starts at the same time when cloud-init does its magic. So, sometimes we end up with corrupted mcollective config. https://bugs.launchpad.net/fuel/+bug/1449186
3) If init script is correct and nailgun-agent will not restart mcollective, we will end up with mcollective not restarted after its config has been changed by cloud-init. And it won't be able to connect to Rabbit. So we need either to prevent mcollective from starting during provisioning (update-rc.d mcollective disable) or we need to restart mcollective in cloud-init runcmd. https://bugs.launchpad.net/fuel/+bug/1455489 (this bug)