RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1758066 - daemon_logv doesn't filter out logs below configured level
Summary: daemon_logv doesn't filter out logs below configured level
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libdaemon
Version: 7.7
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Lennart Poettering
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-03 07:58 UTC by Renaud Métrich
Modified: 2023-03-24 15:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-11 21:51:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Renaud Métrich 2019-10-03 07:58:51 UTC
Description of problem:

The daemon_logv() function, when used with syslog facility, always sends the log to syslog, whatever the priority:

dlog.c:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
 35 static int daemon_verbosity_level = LOG_INFO;

 46 void daemon_logv(int prio, const char* template, va_list arglist) {
 47     int saved_errno;
 48 
 49     saved_errno = errno;
 50 
 51     if (daemon_log_use & DAEMON_LOG_SYSLOG) {
 52         openlog(daemon_log_ident ? daemon_log_ident : "UNKNOWN", LOG_PID, LOG_DAEMON);
 53         vsyslog(prio | LOG_DAEMON, template, arglist);
 54     }
 55 
 56     if (prio > daemon_verbosity_level)
 57         goto end_daemon_logv;
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

The condition on line 56 should be moved prior to line 51.

This results in NetworkManager's teamd daemon, a daemonlog client, to send Debug messages every second even though daemon_verbosity_level is set to LOG_INFO.

Note that this may be expected behaviour, from dlog.h:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
 94 /** Setter for the verbosity level of standard output.
 95  *
 96  * @param verbosity_prio Minimum priority level for messages to output
 97  * on standard output/error
 98  *
 99  * Allows to decide which messages to output on standard output/error
100  * streams. All messages are logged to syslog and this setting does
101  * not influence that.
102  *
103  * The default value is LOG_WARNING.
104  *
105  * @since 0.14
106  * @see DAEMON_SET_VERBOSITY_AVAILABLE
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

If so, then filtering should be made on the client side, which looks redundant to me.

In any case, even if it's expected behaviour the line 103 should be changed because default value is not LOG_WARNING, but LOG_INFO (see dlog.c line 35 above).


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

libdaemon-0.14-7.el7.x86_64


How reproducible:

Always

Comment 3 Chris Williams 2020-11-11 21:51:57 UTC
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7.
From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. 

From the RHEL life cycle page:
https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase
"During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available."

If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes:
https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook  

Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. 

Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns.  

[0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7


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