Bug 9673 - max log size doesn't rotate all logs when using variable logfile names
max log size doesn't rotate all logs when using variable logfile names
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
x64 Linux
: P5 minor
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2013-02-22 16:36 UTC by Marc Muehlfeld
Modified: 2017-02-26 14:10 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2013-02-22 16:36:18 UTC
I use the following parameters for logging:

log file = /var/log/samba/%m.log
debug pid = yes
log level = 1
max log size = 1000

All logfiles are rotated if they get bigger than the configured size (that's how it should be):

# ls -lh*
-rw-r--r-- 1 root root  12K 22. Feb 16:57
-rw-r--r-- 1 root root   1M 21. Feb 11:43

only the %m.log, is growing without end:

# ls -lh %m.log 
-rw-r--r-- 1 root root 20M 22. Feb 17:35 %m.log
Comment 1 Marc Muehlfeld 2014-03-21 13:53:22 UTC
My answer to Björns posting on the samba-technical mailinglist:

Am 21.03.2014 12:21, schrieb Bjoern Baumbach:
> I tried to reproduce the problem which is described in bug 9673, since
> it may be related to bug 10239. I've setup a very simple Samba v4-0-test
> server, started the nmbd and smbd and verified that the log files
> rotating as soon the max log size has been reached.
> This is my config:
> ./bin/testparm  -s
> Load smb config files from /s4/logSizetest/etc/smb.conf
> Loaded services file OK.
> Server role: ROLE_STANDALONE
> [global]
>          log file = /s4/logSizetest/var/rotateme-please-%m.log
>          max log size = 512
> Any suggestion why my setup rotates the logs and other do not?

The difference I see is, that yours is a standalone and on all machines 
I have this, are DCs.

Also on DCs, the logs of the clients are rotated. But there's also one 
logfile named "%m.log" (with your config, It would be called 
"rotateme-please-%m.log"). This one contains output from the samba 
process and not from smbd or the child-smbds forked by connecting 
clients, I think. And this one isn't rotated
Comment 2 Marc Muehlfeld 2014-05-14 07:41:09 UTC
Problem still exists in 4.1.7.
Setting product / version of this bug report to 4.1.7.
Comment 3 Marc Muehlfeld 2016-08-26 02:02:32 UTC
Update: In 4.5.0rc2, the rotation for the log file named %m.log still does not work.
Comment 4 Marc Muehlfeld 2017-02-26 14:10:58 UTC
Problem still exists in 4.6.0rc3.