<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>137016</bug_id>
          
          <creation_ts>2006-06-16 13:25 0000</creation_ts>
          <short_desc>sys-block/vblade - /etc/init.d/vblade.vblade0 script doesn&apos;t stop vblade.vblade0</short_desc>
          <delta_ts>2007-03-07 19:49:58 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>2006.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo.bugs@pointb.co.uk</reporter>
          <assigned_to>robbat2@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>gentoo.bugs@pointb.co.uk</who>
            <bug_when>2006-06-16 13:25:43 0000</bug_when>
            <thetext>After installing vblade-10 I have noticed that running &apos;/etc/init.d/vblade.vblade0 stop&apos; doesn&apos;t stop all required processes:

with vblade.vblade0 started you get the following processes

(root@queeg:~)# ps -edf | grep vblade
root     15555     1  0 21:12 ?        00:00:00 /bin/sh /usr/sbin/vbladed 1 0 eth0 /dev/md3
root     15556 15555  0 21:12 ?        00:00:00 /usr/sbin/vblade 1 0 eth0 /dev/md3
root     15557 15555  0 21:12 ?        00:00:00 /usr/bin/logger -t vblade.vblade0
root     15647 15634  0 21:21 pts/0    00:00:00 grep vblade

and then I stop the vblade.vblade0

(root@queeg:~)# /etc/init.d/vblade.vblade0 stop
 * Stopping vblade.vblade0 ...                                                                                          [ ok ]

all is reported as ok, however I still have the following vblade processes running:

(root@queeg:~)# ps -edf | grep vblade
root     15556     1  0 21:12 ?        00:00:00 /usr/sbin/vblade 1 0 eth0 /dev/md3
root     15557     1  0 21:12 ?        00:00:00 /usr/bin/logger -t vblade.vblade0
root     15688 15634  0 21:22 pts/0    00:00:00 grep vblade
(root@queeg:~)#</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2006-07-21 22:06:42 0000</bug_when>
            <thetext>fixed in cvs.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2006-07-21 22:07:40 0000</bug_when>
            <thetext>forgot to mark resolved.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo.bugs@pointb.co.uk</who>
            <bug_when>2006-08-10 05:23:02 0000</bug_when>
            <thetext>I&apos;ve noticed that with this if you have two vblades running i.e. vblade.vblade0 and vblade.vblade1 when you shut down one of them the script kills all the others too! :-(</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>slynn@granite-mtn.net</who>
            <bug_when>2007-01-04 09:35:04 0000</bug_when>
            <thetext>I have included a fix for this in bug #159994 which bumps the version from 10 to 14.

As noted there, the basis of the problem was that the stop init script contained the ${@} variable in it&apos;s grep for the vblade pids.  Unfortunately the variable was never populated (try printing it out) since nothing was passed to the stop scriipt.  My quick fix was to use the getconf variables to fully reconstruct the start script command line.   Check it out and read my comments about a Gentoo init script calling a bash script wrapper.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2007-03-07 19:49:58 0000</bug_when>
            <thetext>in cvs.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>