[Pkg-puppet-devel] Bug#480263: /etc/init.d/puppetmaster restart fails when SERVERTYPE=mongrel

Francois Deppierraz francois at ctrlaltdel.ch
Fri May 9 07:31:11 UTC 2008


Package: puppetmaster
Version: 0.24.4-6
Severity: normal
Tags: patch

Calling "/etc/init.d/puppetmaster restart" when SERVERTYPE=mongrel is set
in /etc/default/puppetmaster will launch a new set of puppetmasterd
daemon running on ports beginning at $PORT+$PUPPETMASTERS instead of
$PORT.

This is due to the variable $PORT being set in stop_puppetmaster and
reused in start_puppetmaster.

--- puppetmaster.orig2  2008-05-09 09:14:56.000000000 +0200
+++ puppetmaster        2008-05-09 09:19:02.000000000 +0200
@@ -38,15 +38,16 @@
     then
        DAEMON_OPTS="$DAEMON_OPTS --servertype=mongrel"
        NUMSTART=0
+  MASTERPORT=$PORT
        while [ $NUMSTART -lt $PUPPETMASTERS ]; do
-           start-stop-daemon --start --quiet --pidfile=/var/run/puppet/$NAME-$PORT.pid \
-               --startas $DAEMON -- $DAEMON_OPTS --masterport=$PORT --pidfile=/var/run/puppet/$NAME-$PORT.pid
-           PORT=$(($PORT + 1))
+           start-stop-daemon --start --quiet --pidfile=/var/run/puppet/$NAME-$MASTERPORT.pid \
+               --startas $DAEMON -- $DAEMON_OPTS --masterport=$MASTERPORT --pidfile=/var/run/puppet/$NAME-$MASTERPORT.pid
+           MASTERPORT=$(($MASTERPORT + 1))
            NUMSTART=$(($NUMSTART + 1))
        done
     else
        start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \
-           --startas $DAEMON -- $DAEMON_OPTS --masterport=$PORT
+           --startas $DAEMON -- $DAEMON_OPTS --masterport=$MASTERPORT
     fi
 }

@@ -54,10 +55,11 @@
     if [ "$SERVERTYPE" = "mongrel" ]
     then
        NUMSTART=0
+  MASTERPORT=$PORT
        while [ $NUMSTART -lt $PUPPETMASTERS ]; do
-           start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME-$PORT.pid
-           rm /var/run/puppet/$NAME-$PORT.pid
-           PORT=$(($PORT + 1))
+           start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME-$MASTERPORT.pid
+           rm /var/run/puppet/$NAME-$MASTERPORT.pid
+           MASTERPORT=$(($MASTERPORT + 1))
            NUMSTART=$(($NUMSTART + 1))
        done
     else


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-ovz-028stab053.5-smp
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages puppetmaster depends on:
ii  facter                     1.3.7-2       a library for retrieving facts fro
ii  lsb-base                   3.1-23.2etch1 Linux Standard Base 3.1 init scrip
ii  puppet                     0.24.4-6      centralised configuration manageme
ii  ruby                       1.8.2-1       An interpreter of object-oriented 

Versions of packages puppetmaster recommends:
pn  rails                         <none>     (no description available)
ii  rdoc                          1.8.2-1    Generate documentation from ruby s

-- no debconf information





More information about the Pkg-puppet-devel mailing list