Hi, the package samba-2.0.7-4.i386.rpm from Redhat 6.2 updates still does not solve a problem with log rotation. Currently it: 1. Rotates files which are the result of log rotatin (*.1 *.2, etc). 2. fails on log files produced by a host whith a space in its NETBIOS name. This is precisely what I previosly reported on March 1, 2000 in http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=9909 There is, from my point of view, a serios problem with how RedHat bug tracking is organized. Usually, after a bug is reported, somebody from RedHat gives a short response (often without proper evaluation) and marks the bug resolved. Once the bug is marked as resolved all futher information about it is just ignored. This happened many times with many different bugs. My proposal is to change the procdure, i.e. bug may be marked as resolved only after it was confirmed as fixed by a reporter.
Caused, I think, by the use of log.* in /etc/logrotate.d/samba. Log files either need to be specified explicitly or some means of preventing generation of successive .N extensions by logrotate needs to be found.
With these problems, is there any reason that logrotate should be used instead of samba to rotate the logs (I'm not seeing any...)
Logrotate is perfectly OK if you: 1. Set samba log files pattern to *.log 2. Fix logrotate to work with files which has spaces and other special symbols in it. You will need to fix this anyway for the other programs. Many programs can generate log files with strange names.
In addition to mentioned above reasons there are the following other reasons: 1. Samba rotates logs quite inconsistently in accordance with its own strange algorithm. Using logrotate you have common framework for all log files rotation. 2. You can get it to work fine with very minor changes and one fix to logrotate (which should be done anyway). I posted the changes required in my previos posting.
samba changes are in 2.0.7-10. Reassigned to logrotate for the rest of the fixes.
Also, The easiest wy to fix logrotate is to use URLEcoded format for file names. You can just use two C functions which do same thing as escape and unescape from perl module /usr/lib/perl5/5.00503/CGI.pm. when you save to /var/lib/logrotate.status escape file as by using a function equivalent to CGI::escape and after you read the string from the file use a function equivalent to CGI::unescape. This way you will fix all the problems with file names containing special symbols in logrotate. The mentioned functions escape and unescape are standard and may be found in many reference implementation. I recommend to name them like logrotate_escape and logrotate_unescape to avoid possible clashes with functions from C library.
Logrotate support white problems now -- tthe * matching .1 needs to be fixed in it's config file.
OK, with the combination of samba-2.0.7-10 or higher, and logrotate-3.4 or higher, this should be fixed.
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/d26759937d1840d0a726e5509af89c9a4e03a7ac Merge pull request #11807 from jim-minter/issue11606 Merged by openshift-bot