Bug 171536 - logrotate script should not run 'kill -HUP' on nmbd
logrotate script should not run 'kill -HUP' on nmbd
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Simo Sorce
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2005-10-22 11:43 EDT by Jordan Russell
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-23 18:47:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jordan Russell 2005-10-22 11:43:38 EDT
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 netmask=
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:

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

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:

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-19 19:27:20 EST
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 ?

Comment 2 Jordan Russell 2007-01-20 13:28:32 EST
Issue still exists in FC6's samba-3.0.23c-2 package.
Comment 3 Simo Sorce 2007-03-23 18:47:56 EDT
Fixed in rawhide -> FC7

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