Bug 15706 - Consistent log level for sighup handler
Summary: Consistent log level for sighup handler
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.19.8
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-02 09:05 UTC by Jones Syue (dead mail address)
Modified: 2024-11-19 14:48 UTC (History)
2 users (show)

See Also:


Attachments
Patch for v4-21-test (3.41 KB, patch)
2024-09-27 03:19 UTC, Jones Syue (dead mail address)
jra: review+
martins: review+
Details
Patch for v4-20-test (3.41 KB, patch)
2024-09-27 03:20 UTC, Jones Syue (dead mail address)
jra: review+
martins: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jones Syue (dead mail address) 2024-09-02 09:05:58 UTC
When turn-on 'log level = 3', sending SIGHUP to samba processes, for 
example: smbd parent/children, smbd-notifyd, and smbd-cleanupd. Then 
monitor log.smbd in order to parse sighup logs, it looks like the log level
is inconsistent among these processes: smbd parent/children use level 1, 
and smbd-notifyd/smbd-cleanupd use level 3.

This patch raises sighup handler's log level from level 1 to level 3, which
is more consistent with smbd-notifyd by Commit 6e5bff80a0a0b ("s3:notifyd: 
Handle sigup in notifyd to reparse smb.conf"), and smbd-cleanupd by Commit
57c1e115ecef4 ("smbd: reopen logs on SIGHUP for notifyd and cleanupd").

patch will follow.

Before patch:

[2024/09/02 16:43:21.002435,  1] ../../source3/smbd/server.c:1420(smbd_parent_sig_hup_handler)
  parent: Reloading services after SIGHUP
[2024/09/02 16:43:21.003141,  3] ../../source3/smbd/server.c:382(notifyd_sig_hup_handler)
  notifyd_sig_hup_handler: notifyd: Reloading services after SIGHUP
[2024/09/02 16:43:21.003852,  3] ../../source3/smbd/server.c:561(cleanupd_sig_hup_handler)
  cleanupd_sig_hup_handler: cleanupd: Reloading services after SIGHUP
[2024/09/02 16:43:21.003968,  1] ../../source3/smbd/smb2_process.c:1633(smbd_sig_hup_handler)
  Reloading services after SIGHUP

After patch:

[2024/09/02 16:54:14.987507,  3] ../../source3/smbd/server.c:1420(smbd_parent_sig_hup_handler)
  smbd_parent_sig_hup_handler: parent: Reloading services after SIGHUP
[2024/09/02 16:54:14.988214,  3] ../../source3/smbd/server.c:382(notifyd_sig_hup_handler)
  notifyd_sig_hup_handler: notifyd: Reloading services after SIGHUP
[2024/09/02 16:54:14.988841,  3] ../../source3/smbd/server.c:561(cleanupd_sig_hup_handler)
  cleanupd_sig_hup_handler: cleanupd: Reloading services after SIGHUP
[2024/09/02 16:54:14.988925,  3] ../../source3/smbd/smb2_process.c:1633(smbd_sig_hup_handler)
  smbd_sig_hup_handler: Reloading services after SIGHUP
Comment 2 Samba QA Contact 2024-09-25 01:39:04 UTC
This bug was referenced in samba master:

4f3dfb2029c667b6dcd43223fe154dca59143e95
Comment 3 Jones Syue (dead mail address) 2024-09-27 03:19:37 UTC
Created attachment 18446 [details]
Patch for v4-21-test
Comment 4 Jones Syue (dead mail address) 2024-09-27 03:20:53 UTC
Created attachment 18447 [details]
Patch for v4-20-test
Comment 5 Jeremy Allison 2024-10-02 18:04:41 UTC
Re-assigning to Jule for inclusion in 4.20.next, 4.21.next.
Comment 6 Jule Anger 2024-10-04 08:03:22 UTC
Pushed to autobuild-v4-{21,20}-test.
Comment 7 Samba QA Contact 2024-10-04 10:14:11 UTC
This bug was referenced in samba v4-21-test:

bbfc736f268af22d059a22dc85ed3c4345df4cb1
Comment 8 Samba QA Contact 2024-10-04 12:56:11 UTC
This bug was referenced in samba v4-20-test:

676ac1793a1c13f45b9b76ee405511cf836cb000
Comment 9 Jule Anger 2024-10-07 08:24:57 UTC
Closing out bug report.

Thanks!
Comment 10 Samba QA Contact 2024-10-14 11:33:43 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.1):

bbfc736f268af22d059a22dc85ed3c4345df4cb1
Comment 11 Samba QA Contact 2024-11-19 14:48:32 UTC
This bug was referenced in samba v4-20-stable (Release samba-4.20.6):

676ac1793a1c13f45b9b76ee405511cf836cb000