Bug 45168 - univention-samba: /etc/init.d/smbd restart breaks samba-shares listener
univention-samba: /etc/init.d/smbd restart breaks samba-shares listener
Status: NEW
Product: UCS
Classification: Unclassified
Component: Samba
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-08 18:30 CEST by Arvid Requate
Modified: 2021-04-14 11:56 CEST (History)
7 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017071321000526
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2017-08-08 18:30:53 CEST
This is a special consequence of the general Bug #44237. I open it, because I hope we can at least implement a workaround in the samba-shares listener to avoid silent malfunction:

If somebody manually runs 

/etc/init.d/smbd restart

then systemctl looses track of the daemon and rates it as "dead". This causes subsequent 

/etc/init.d/samba reload

calls to fail. The samba-shares listener relies on this reload to inform the smbd about configuration changes. We should try to implement a workaround in the samba-shares listener that detects this situation and takes suitable steps to recover, like running /etc/init.d/samba restart.
Comment 1 Arvid Requate univentionstaff 2017-08-08 18:33:49 CEST
This is what the listener.log looks like in this situation:

======================================================================
08.08.17 14:00:36.447  LISTENER    ( PROCESS ) : updating 'cn=share01,cn=member01.foo.intranet,cn=shares,dc=foo,dc=intranet' command m
UNIVENTION_DEBUG_BEGIN  : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
UNIVENTION_DEBUG_END    : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
Reloading samba configuration (via systemctl): samba.service.
Starting nfs-kernel-server (via systemctl): nfs-kernel-server.service.
Reloading nfs-kernel-server configuration (via systemctl): nfs-kernel-server.service.
08.08.17 14:02:32.092  LISTENER    ( PROCESS ) : updating 'cn=share01,cn=member01.foo.intranet,cn=shares,dc=foo,dc=intranet' command m
UNIVENTION_DEBUG_BEGIN  : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
UNIVENTION_DEBUG_END    : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
Reloading samba configuration (via systemctl): samba.service.
Starting nfs-kernel-server (via systemctl): nfs-kernel-server.service.
Reloading nfs-kernel-server configuration (via systemctl): nfs-kernel-server.service.
08.08.17 14:04:42.915  LISTENER    ( PROCESS ) : updating 'cn=share01,cn=member01.foo.intranet,cn=shares,dc=foo,dc=intranet' command m
UNIVENTION_DEBUG_BEGIN  : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
UNIVENTION_DEBUG_END    : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
Reloading samba configuration (via systemctl): samba.serviceJob for samba.service failed. See 'systemctl status samba.service' and 'journalctl -xn' for details.
 failed!
Starting nfs-kernel-server (via systemctl): nfs-kernel-server.service.
Reloading nfs-kernel-server configuration (via systemctl): nfs-kernel-server.service.
08.08.17 14:14:26.735  LISTENER    ( PROCESS ) : updating 'cn=share01,cn=member01.foo.intranet,cn=shares,dc=foo,dc=intranet' command m
UNIVENTION_DEBUG_BEGIN  : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
UNIVENTION_DEBUG_END    : uldap.__open host=master01.foo.intranet port=7389 base=dc=foo,dc=intranet
Reloading samba configuration (via systemctl): samba.serviceJob for samba.service failed. See 'systemctl status samba.service' and 'journalctl -xn' for details.
 failed!
======================================================================