[PATCH] enable logging for early startup failures

Ralph Wuerthner ralphw at de.ibm.com
Thu Apr 18 07:21:11 UTC 2019


On 17.04.19 18:05, Stefan Metzmacher wrote:
> Hi Ralph,
> 
> 
>>>>> Do you know with what change this got lost?
>>>>> This used to appear in the log files and recently noticed that this
>>>>> information isn't available anymore (at least in 4.7), but it was
>>>>> there before (at least in 3.6)
>>>>>
>>>>> For 'samba' it's still here, but smbd and winbind (and I guess nmbd)
>>>>> don't print it into the log file anymore.
>>>>>
>>>>> I think we should fix that and restore what we had before.
>>>>> Always using syslog (even if it's not configured) seems wrong to me.
>>>>>
>>>>> metze
>>>>>
>>>>
>>>> I did some research and the the patch set dee2b95..72f1a2a changed the
>>>> behavior. More precisely c89a33a07a 'debug: Use backends instead of
>>>> explicitly logging to syslog or file' disabled the startup messages.
>>>> To restore the original behavior it should be enough to call
>>>> debug_set_settings() with "file" as value for parameter
>>>> "logging_param". Please see attached patch set with this change in
>>>> patch #3.
>>>>
>>>
>>> One more thing: to completely restore the old behavior we probably have
>>> to set the default value for "logging" to "file". Currently the default
>>> value is empty.
>>
>> Can you specify what the original behavior was?
>>
>> Was it logging to a file only? If I look at the code in 4.1 it seems to
>> me that we logged to syslog (if compiled with syslog support) and also
>> to the file (unless syslog only was configured).
> 
> Ok, state.settings.syslog is 0 and state.settings.syslog_only = false
> when we enter reopen_logs() before lp_loaded() returns true.
> 
> So the initial message (with loglevel >= 0, which means all) only went
> to the log file and not to the syslog.
> 
> Can you file a bug report and add the url to the commit messages
> and also push it through a gitlab pipeline?
> 
> Thanks!
> metze
> 

Hi Metze!

I opened Samba bugzilla 13904 and added the buzilla URL to the commit 
messages. Please see the attached new version of the patch. The gitlab 
pipeline is running at 
https://gitlab.com/samba-team/devel/samba/pipelines/57368175

-- 
Regards

Ralph Wuerthner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-debug-enable-logging-for-early-startup-failures-v4.patch
Type: text/x-patch
Size: 4171 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190418/818c3d88/0001-s3-debug-enable-logging-for-early-startup-failures-v4.bin>


More information about the samba-technical mailing list