I just saw this bug while merging Debian's latest samba into ubuntu, because it had this changelog snippet:
* Fix logrotate for /var/log/samba/log.samba to send SIGHUP to all processes
of the service (systemd only)
The logrotate script now uses smbcontrol <smbd|nmbd> reload-config (not "all", which isn't listed as a valid destination in the current smbcontrol help output [v4.6.5]), but I still see the problem happening. This is after a forced logrotate:
I just saw this bug while merging Debian's latest samba into ubuntu, because it had this changelog snippet:
* Fix logrotate for /var/log/ samba/log. samba to send SIGHUP to all processes
of the service (systemd only)
The logrotate script now uses smbcontrol <smbd|nmbd> reload-config (not "all", which isn't listed as a valid destination in the current smbcontrol help output [v4.6.5]), but I still see the problem happening. This is after a forced logrotate:
root@artful- samba-merge: /var/log/ samba# fuser log* samba/log. : 8841 samba/log. nmbd: 7177 samba/log. nmbd.1: 8841 samba/log. smbd: 7132 7140 samba/log. smbd.1: 7133 7134 8841 samba/log. wb-ARTFUL- SAMBA-MERGE: 6997 8841 samba/log. wb-BUILTIN: 7138 8841 samba/log. winbindd: 6996 8841 samba/log. winbindd- idmap: 7137 8841
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
root@artful- samba-merge: /var/log/ samba# smbcontrol smbd reload-config
root@artful- samba-merge: /var/log/ samba# fuser log* samba/log. : 8841 samba/log. nmbd: 7177 samba/log. nmbd.1: 8841 samba/log. smbd: 7132 7140 samba/log. smbd.1: 7133 7134 8841 samba/log. wb-ARTFUL- SAMBA-MERGE: 6997 8841 samba/log. wb-BUILTIN: 7138 8841 samba/log. winbindd: 6996 8841 samba/log. winbindd- idmap: 7137 8841
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
The rotated log files are still kept open by smbd processes. I'll add the server-next tag to this bug to take a look at this in more detail soon.