[Pkg-samba-maint] Bug#740942: [samba] /etc/init.d/samba forbit systemd shutdown system

Cesare Leonardi ced at bernispa.com
Tue Sep 23 08:18:09 UTC 2014


Package: samba
Version: 2:4.1.11+dfsg-1
Followup-For: Bug #740942

Some notes.
On shutdown/reboot, occasionally i see this message from systemd,
with a countdown and a moving asterisk:
-------------
A stop job is running for LSB: ensure samba daemons are started (nmbd
and smbd) ( 3 min 2 s / 5 min )
-------------
But normally it's just silent.

Launching this:
date ; systemctl stop samba ; date
In /var/log/syslog i see:
Sep 23 08:58:26 barone systemd[1]: samba.service stopping timed out. Terminating.
Sep 23 08:58:26 barone samba[1324]: Stopping samba-ad-dc (via systemctl): samba-ad-dc.service
Sep 23 08:58:26 barone systemd[1]: Unit samba.service entered failed state.
Sep 23 08:58:27 barone samba-ad-dc[1383]: Stopping Samba AD DC daemon: samba.

On the command line, the delay happens with both these commands:
systemctl stop samba
service samba stop

But with the old way there is no delay and there is some informative output:
/etc/init.d/samba stop
* Stopping samba-ad-dc (via systemctl): samba-ad-dc.service
* Stopping smbd (via systemctl): smbd.service
* Stopping nmbd (via systemctl): nmbd.service

Launching the previous commands like that:
date ; /etc/init.d/samba-ad-dc stop ; date; sleep 2 ; /etc/init.d/smbd stop ; date ; sleep 2 ; /etc/init.d/nmbd stop ; date
mar 23 set 2014, 09.13.26, CEST
[ ok ] Stopping samba-ad-dc (via systemctl): samba-ad-dc.service.
mar 23 set 2014, 09.13.27, CEST
[ ok ] Stopping smbd (via systemctl): smbd.service.
mar 23 set 2014, 09.13.30, CEST
[ ok ] Stopping nmbd (via systemctl): nmbd.service.
mar 23 set 2014, 09.13.33, CEST

In /var/log/syslog i see some moessages:
Sep  3 09:13:27 barone samba-ad-dc[1661]: Stopping Samba AD DC daemon: samba.
Sep 23 09:13:29 barone smbd[1311]:   STATUS=daemon 'smbd' finished starting up and ready to serve connectionsFailed to delete pidfile /var/run/samba/smbd.pid. Error was No such file or directory
Sep 23 09:13:30 barone smbd[1694]: Stopping SMB/CIFS daemon: smbd.
Sep 23 09:13:32 barone nmbd[1280]:   STATUS=daemon 'nmbd' finished starting up and ready to serve connectionsGot SIGTERM: going down...
Sep 23 09:13:33 barone nmbd[1727]: Stopping NetBIOS name server: nmbd.

Moreover, the following separate commands shows no delay:
systemctl stop samba-ad-dc.service
systemctl stop smbd.service
systemctl stop nmbd.service
But if after those i run the following (namely with the three services
already stopped), it just delay for 5 min as usual:
systemctl stop samba

The following doesn't help either:
systemctl stop winbind
systemctl stop samba

Cesare.


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.16-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages samba depends on:
ii  adduser                              3.113+nmu3
ii  dpkg                                 1.17.13
ii  libasn1-8-heimdal                    1.6~rc2+dfsg-8
ii  libbsd0                              0.7.0-2
ii  libc6                                2.19-11
ii  libcomerr2                           1.42.12-1
ii  libhdb9-heimdal [heimdal-hdb-api-8]  1.6~rc2+dfsg-8
ii  libkdc2-heimdal                      1.6~rc2+dfsg-8
ii  libkrb5-26-heimdal                   1.6~rc2+dfsg-8
ii  libldb1                              1:1.1.17-1
ii  libpam-modules                       1.1.8-3.1
ii  libpam-runtime                       1.1.8-3.1
ii  libpopt0                             1.16-10
ii  libpython2.7                         2.7.8-7
ii  libroken18-heimdal                   1.6~rc2+dfsg-8
ii  libtalloc2                           2.1.1-2
ii  libtdb1                              1.3.0-1.1
ii  libtevent0                           0.9.21-1
ii  lsb-base                             4.1+Debian13
ii  multiarch-support                    2.19-11
ii  procps                               1:3.3.9-7
ii  python                               2.7.8-1
ii  python-dnspython                     1.12.0-1
ii  python-ntdb                          1.0-5
ii  python-samba                         2:4.1.11+dfsg-1
pn  python2.7:any                        <none>
ii  samba-common                         2:4.1.11+dfsg-1
ii  samba-common-bin                     2:4.1.11+dfsg-1
ii  samba-dsdb-modules                   2:4.1.11+dfsg-1
ii  samba-libs                           2:4.1.11+dfsg-1
ii  tdb-tools                            1.3.0-1.1
ii  update-inetd                         4.43

Versions of packages samba recommends:
ii  attr               1:2.4.47-2
ii  logrotate          3.8.7-1
ii  samba-vfs-modules  2:4.1.11+dfsg-1

Versions of packages samba suggests:
ii  bind9          1:9.9.5.dfsg-4
ii  bind9utils     1:9.9.5.dfsg-4
pn  ctdb           <none>
pn  ldb-tools      <none>
ii  ntp            1:4.2.6.p5+dfsg-3.1
pn  smbldap-tools  <none>
ii  winbind        2:4.1.11+dfsg-1

-- debconf information:
  samba/run_mode: daemons
  samba-common/title:



More information about the Pkg-samba-maint mailing list