← Back to team overview

enterprise-support team mailing list archive

[Bug 1415651] [NEW] Serious problem with /lib/lsb/init-dunctions.d/01-upstart-lsb

 

You have been subscribed to a public bug:

Ubuntu server 14.10 with xfce4 desktop

Any attempt to halt samba with either "service samba stop" or
"/etc/init.d/samba stop" fails with the following message:

stop: Unknown instance:

Examining /etc/init.d/samba shows that stop issues:

stop)
        /etc/init.d/samba-ad-dc stop
        /etc/init.d/smbd stop
        /etc/init.d/nmbd stop

Running   "/etc/init.d/smbd stop"  and   "/etc/init.d/nmbd stop"
manually work properly.

Running "/etc/init.d/samba-ad-dc stop" produces the error message above
and no processes are haulted.  However, I did notice that if I move into
the /etc/init.d directory and issue either   "samba-ad-dc stop"   or
"./samba-ad-dc stop"   then the script works and the samba process is
indeed haulted.

I added "set -x" to the stop of the samba-ad-dc script and observed the
following:

# samba-ad-dc stop
+ PIDDIR=/var/run/samba
+ SAMBAPID=/var/run/samba/samba.pid
+ unset TMPDIR
+ test -x /usr/sbin/samba -a -r /etc/samba/smb.conf
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/01-upstart-lsb ]
+ . /lib/lsb/init-functions.d/01-upstart-lsb
+ unset UPSTART_SESSION
+ _RC_SCRIPT=samba-ad-dc
+ [ -r /etc/init/samba-ad-dc.conf ]
+ which initctl
+ initctl version
+ grep -q upstart
+ exit 0

I restarted samba and then tried the following:

#/etc/init.d/samba-ad-dc stop
+ PIDDIR=/var/run/samba
+ SAMBAPID=/var/run/samba/samba.pid
+ unset TMPDIR
+ test -x /usr/sbin/samba -a -r /etc/samba/smb.conf
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/01-upstart-lsb ]
+ . /lib/lsb/init-functions.d/01-upstart-lsb
+ unset UPSTART_SESSION
+ _RC_SCRIPT=/etc/init.d/samba-ad-dc
+ [ -r /etc/init//etc/init.d/samba-ad-dc.conf ]
+ _UPSTART_JOB=samba-ad-dc
+ [ -r /etc/init/samba-ad-dc.conf ]
+ which initctl
+ initctl version
+ grep -q upstart
+ initctl status samba-ad-dc
+ exec stop samba-ad-dc
stop: Unknown instance:

Note that the functions in /lib/lsb/init-functions are loaded and then
/lib/lsb/init-functions.d/01-upstart-lsb is run.  Check out the next
couple of lines.  When the fully qualified path /etc/init/samba-ad-dc is
used, this function fails to first properly strip it to its basename
before readding the etc/init/ path component.  This causes the
subsequent line:

if [ -r "/etc/init/${_RC_SCRIPT}.conf" ] && which initctl >/dev/null \
   && initctl version 2>/dev/null | grep -q upstart

to fail.  The "unknown instance" message must be issued from
/sbin/initctl.

More investigation needs to be done.  I will report any additional
information I discover.  I see a lot of different bug reports related to
this "stop: Unknown instance:" message, and I wonder if they are not all
related.

** Affects: samba (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bot-comment
-- 
Serious problem with /lib/lsb/init-dunctions.d/01-upstart-lsb
https://bugs.launchpad.net/bugs/1415651
You received this bug notification because you are a member of Ubuntu Server/Client Support Team, which is subscribed to samba in Ubuntu.