Bug 171536 - logrotate script should not run 'kill -HUP' on nmbd
Summary: logrotate script should not run 'kill -HUP' on nmbd
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 6
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-22 15:43 UTC by Jordan Russell
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-23 22:47:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jordan Russell 2005-10-22 15:43:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

Description of problem:
Every Sunday, I get 'debug info' messages from nmbd in /var/log/messages:

Oct 22 04:07:55 server nmbd[1377]: [2005/10/22 04:07:55, 0] nmbd/nmbd.c:process(542)
Oct 22 04:07:55 server nmbd[1377]:   Got SIGHUP dumping debug info.
Oct 22 04:07:55 server nmbd[1377]: [2005/10/22 04:07:55, 0] nmbd/nmbd_workgroupdb.c:dump_workgroups(284)
Oct 22 04:07:55 server nmbd[1377]:   dump_workgroups()
Oct 22 04:07:55 server nmbd[1377]:    dump workgroup on subnet      192.168.0.9: netmask=  255.255.255.0:
Oct 22 04:07:55 server nmbd[1377]:       WORKGROUP(1) current master browser = SERVER
Oct 22 04:07:55 server nmbd[1377]:               SERVER 40049a03 (Samba Server)
Oct 22 04:07:55 server nmbd[1377]:               WORKST1 40011003 ()
Oct 22 04:07:55 server nmbd[1377]:               WORKST2 40031003 ()

They're caused by these lines in /etc/logrotate.d/samba:

    postrotate
        /bin/kill -HUP `cat /var/run/smbd.pid /var/run/nmbd.pid /var/run/winbindd.pid 2> /dev/null` 2> /dev/null || true
    endscript

I'm guessing the writer of the script thought that, like many other programs, sending a HUP signal would tell Samba to close & reopen its log files. But as far as I can tell, that isn't the case. The manual pages for smbd, nmbd, and winbindd say nothing about HUP affecting the log files (and in the case of nmbd, the documented behavior is to dump debugging info). Besides, the logrotate script uses the "copytruncate" option, so there's no need to even try to tell the daemons to reopen their log files.

So, to avoid having a bunch of useless 'debug info' printed in /var/log/messages every time logs are rotated, I think the above lines ought to be removed.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Look at /var/log/messages after logrotate runs on Sunday.


Actual Results:  nmbd spit out a bunch of debugging info.

Expected Results:  It shouldn't write any debugging info when rotating logs.

Additional info:

Comment 1 Christian Iseli 2007-01-20 00:27:20 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 2 Jordan Russell 2007-01-20 18:28:32 UTC
Issue still exists in FC6's samba-3.0.23c-2 package.

Comment 3 Simo Sorce 2007-03-23 22:47:56 UTC
Fixed in rawhide -> FC7


Note You need to log in before you can comment on or make changes to this bug.