Mcollective is launched more than once

Bug #965188 reported by Raphaël Pinson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mcollective (Ubuntu)
Invalid
Medium
Marc Cluet

Bug Description

Using mcollective 1.2.1+dfsg-2ubuntu1 in Ubuntu Precise:

root@wrk4 (staging) (wrk-c2c):~# ps axuww | grep mco
root 9753 0.0 0.0 11380 928 pts/0 S+ 13:42 0:00 grep mco
root@wrk4 (staging) (wrk-c2c):~# service mcollective start
mcollective start/running, process 9759
root@wrk4 (staging) (wrk-c2c):~# ps axuww | grep mco
root 9762 4.4 0.7 109916 29528 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9766 4.8 0.7 109920 29532 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9771 5.0 0.7 109960 29532 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9789 4.8 0.7 109916 29524 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9812 4.8 0.7 109960 29532 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9837 4.6 0.7 109960 29528 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9859 6.2 0.7 109956 29528 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9878 5.5 0.7 109920 29536 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9890 6.5 0.7 109964 29532 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9913 6.0 0.7 109924 29540 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9921 5.2 0.7 109960 29532 ? Sl 13:42 0:00 ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg
root 9969 0.0 0.0 11380 928 pts/0 S+ 13:42 0:00 grep mco

The init script comes from the package:

root@wrk4 (staging) (wrk-c2c):~# cat /etc/init/mcollective.conf
description "mcollective daemon"
author "Marc Cluet <email address hidden>"

start on runlevel [2345]
stop on runlevel [!2345]
respawn

env RUBYLIB=/usr/local/lib/site_ruby/1.8:$RUBYLIB
exec /usr/sbin/mcollectived --pid="/var/run/mcollectived.pid" --config="/etc/mcollective/server.cfg"

Launching the exec line manually only starts one instance of mcollective.

Upstart is version 1.5-0ubuntu1.

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

Hi Raphael,

This is due to a misconfiguration in mcollective's server.cfg

The way upstart behaves with scripts that fork themselves (as is the case with mcollective) makes it very difficult for upstart to track the process once it has been forked.

This is why the default configuration in mcollective server.cfg on the package specifies daemonize=0 so upstart can track the process properly.

This behaviour shown on the bug means that the user has set daemonize=1 on server.cfg, which is not supported by the upstart script.

Marking as invalid.

Revision history for this message
Raphaël Pinson (raphink) wrote :

Thank you.

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

Other bug subscribers

Remote bug watches

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