I don't think that this bug relates to signal issues -- I can clearly
verify that puppetmaster reliably stops using the initscript after
modifying the killproc() function of /lib/lsb/init-functions that
/etc/init.d/puppetmaster calls (through stop_puppetmaster()).

The problem is the parameter "--name" used with start-stop-daemon: It's
used in the line

    /sbin/start-stop-daemon --stop --pidfile "$pidfile" \
                        --retry 5 --quiet --oknodo --name "$base"

where "$base" is assigned as

    base=$(basename "$1")

where "$1" is the argument "$DAEMON" or "/usr/sbin/puppetmasterd" in the
puppetmaster initscript. Thus, start-stop-daemon will look for a process
named "puppetmasterd" in /proc/<pid>/stat (see the manpage of
start-stop-daemon). This will fail, however, since puppetmasterd seems
to be called through ruby:


[EMAIL PROTECTED]:~# /etc/init.d/puppetmaster start
Starting puppet configuration management tool master server.

[EMAIL PROTECTED]:~# ps aux|grep puppet|grep -v grep
puppet   27351  0.9  1.6 24840 14964 ?       Ss   00:58   0:00 ruby
/usr/sbin/puppetmasterd --

[EMAIL PROTECTED]:~# cat /proc/27351/stat
27351 (ruby) S 1 27351 27351 0 -1 64 3689 0 0 0 16 0 0 0 16 0 2 0
261780003 25436160 3741 4294967295 134512640 134514692 3221224752
3221156412 4294960144 0 0 0 33586759 0 0 0 17 0 0 0

[EMAIL PROTECTED]:~# /etc/init.d/puppetmaster stop
Stopping puppet configuration management tool master server.

[EMAIL PROTECTED]:~# ps aux|grep puppet|grep -v grep
puppet   27351  0.0  1.6 24840 14964 ?       Ss   00:58   0:00 ruby
/usr/sbin/puppetmasterd --

[EMAIL PROTECTED]:~# ls /proc/27351/stat
/proc/27351/stat


If I omit the "--name"-parameter, start-stop-daemon will successfully
kill the process.

My guess is that this is a bug of killproc() and should therefore be
filed to the lsb-base maintainer as not every process will be named
after its startup name (particularly most "programs" run by interpreted
languages like ruby or python). I'm not too sure about this, though.


--Timo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to