Bug 15706 - Consistent log level for sighup handler
Summary: Consistent log level for sighup handler
Status: NEW
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: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-02 09:05 UTC by Jones Syue
Modified: 2024-09-02 11:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jones Syue 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