[Pkg-samba-maint] Bug#739887: [Pkg-systemd-maintainers] Bug#739887: Bug#739887: systemd cannot stop samba (hangs forever)

Michael Biebl biebl at debian.org
Fri Feb 28 16:55:09 UTC 2014


reassign 739887 samba
severity 739887 important
found 739887 2:4.1.5+dfsg-1
retitle 2:4.1.5+dfsg-1 broken samba LSB header causes dependency loops
thanks

Am 28.02.2014 12:03, schrieb Adrian Knoth:

>> The samba sysv init script is an odd one. I'm copying the relevant parts
>> here:
>>
>> ### BEGIN INIT INFO
>> # Provides:          samba
>> # Required-Start:    smbd nmbd
>> # Required-Stop:     smbd nmbd
>> # Default-Start:
>> # Default-Stop:
>> # Short-Description: ensure Samba daemons are started (nmbd and smbd)
>> ### END INIT INFO
>>
>> set -e
>>
>> # start nmbd, smbd and samba-ad-dc unconditionally
>> # the init scripts themselves check if they are needed or not
>> case $1 in
>>         start)
>>                 /etc/init.d/nmbd start
>>                 /etc/init.d/smbd start
>>                 /etc/init.d/samba-ad-dc start
>>                 ;;
>>         stop)
>>                 /etc/init.d/samba-ad-dc stop
>>                 /etc/init.d/smbd stop
>>                 /etc/init.d/nmbd stop
>>
>> So, the samba.service depends on smbd.service and nmbd.service (via its
>> LSB header) yet it stops those services manually. This leads to a dead lock.
> 
> Exactly.
> 
>> If you remove "smbd nmbd" from  Required-Start:/Required-Stop: and
>> reload systemd, this should fix your issue.
> 
> It does. So we reassign the bug to the samba package and wait for an
> updated init.d script?

Yeah, the samba SysV init script should be fixed and those dependencies
removed from the LSB header, reassigning. The samba SysV init script is
for convenience only, and not hooked up in any runlevels. So the
dependency information in the LSB header is unnecessary.


> Sooner or later, proper service/socket files might be useful, too.
> Conveniently, Arch (and others) offers templates. ;)
> 
>    <https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/samba>

We would love to see proper systemd support in samba and the Debian
pkg-systemd offers our help in case review/testing/input is needed.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20140228/8190af37/attachment.sig>


More information about the Pkg-samba-maint mailing list