mcollective upstart script starts too many processes

Bug #918348 reported by xian
42
This bug affects 6 people
Affects Status Importance Assigned to Milestone
mcollective (Ubuntu)
Invalid
High
Marc Cluet

Bug Description

It looks like the upstart script for mcollective does not work

Installed mcollective 1.2.1-0ubuntu2.1

No mcollectived processes running.
# ps -ef | grep mcollectived
#

Start mcollective
# service mcollective start
mcollective start/running, process 13451
# ps -ef | grep mcollectived | grep -v grep
root 13454 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13459 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13464 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13469 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13475 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13480 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13485 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13494 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13499 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13504 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13509 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
#

Obviously results in multiple mcollective processes started

Attempting to stop mcollective does not work either...
# service mcollective stop
stop: Unknown instance:
# ps -ef | grep mcollectived | grep -v grep
root 13454 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13459 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13464 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13469 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13475 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13480 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13485 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13494 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13499 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13504 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 13509 1 0 13:01 ? 00:00:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
#

System info:
# lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

Changed in mcollective (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mcollective (Ubuntu):
status: New → Confirmed
Revision history for this message
Karel Vervaeke (karel-vervaeke) wrote :

Adding an 'expect fork' to /etc/init/mcollective.conf fixes the problem

Revision history for this message
Karel Vervaeke (karel-vervaeke) wrote :

This patch adds 'expect fork' to the upstart file. There used to be an 'expect daemon' in natty, but it got replaced by 'respawn' in this commit: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/mcollective/precise/revision/9/debian/mcollective.upstart

Revision history for this message
Marc Cluet (lynxman) wrote :

This is due to having daemon=1 on the mcollectived configuration file which is recommended against in upstart.

The right fix is to set daemon=0 on mcollective config

Changed in mcollective (Ubuntu):
assignee: nobody → Marc Cluet (lynxman)
status: Confirmed → Invalid
Revision history for this message
Marc Cluet (lynxman) wrote :

Marked as invalid since the proposed solution by Karel would confuse upstart's tracking of the process, that's why it was changed in the first place

Thank you anyway Karel :) much appreciated!

Revision history for this message
Karel Vervaeke (karel-vervaeke) wrote : Re: [Bug 918348] Re: mcollective upstart script starts too many processes

Thanks for the info! Btw, my mcollective configuration was managed by
this puppet module:
https://github.com/puppetlabs/puppetlabs-mcollective

I'll see if I can get it fixed there...
On Tue, Jan 24, 2012 at 2:25 PM, Marc Cluet <email address hidden> wrote:
> Marked as invalid since the proposed solution by Karel would confuse
> upstart's tracking of the process, that's why it was changed in the
> first place
>
> Thank you anyway Karel :) much appreciated!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/918348
>
> Title:
>  mcollective upstart script starts too many processes
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/mcollective/+bug/918348/+subscriptions

Revision history for this message
xian (mchugh19) wrote :

Thanks! Daemon=1 is needed on debian, but not for ubuntu.

I have a custom puppet module to for mcollective which uses ssl certs instead of a shared key. I added logic for debian/ubuntu to push out the proper server.conf and it works great.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.