Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
"virtlogd --verbose" doesn't output verbose messages
Version-Release number of selected component (if applicable):
libvirt-3.2.0-2.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
0.Don't change log setting in /etc/libvirt/virtlog.conf:
# grep '^log' /etc/libvirt/virtlogd.conf
(nothing output)
1.stop virtlogd
# systemctl stop virtlogd.socket
2.
# virtlogd --verbose
(No log printed)
^C
3.Change log_level to 3 or 4, the result is same as step 2.
4.Change log_level to 2:
# grep '^log' /etc/libvirt/virtlogd.conf
log_level = 2
5.
# virtlogd --verbose
2017-04-18 07:19:24.865+0000: 8854: info : libvirt version: 3.2.0, package: 2.virtcov.el7 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2017-04-10-10:58:42, x86-038.build.eng.bos.redhat.com)
2017-04-18 07:19:24.865+0000: 8854: info : hostname: intel-5205-32-1.englab.nay.redhat.com
2017-04-18 07:19:24.865+0000: 8854: info : virObjectNew:202 : OBJECT_NEW: obj=0x557a035a2ec0 classname=virNetServer
2017-04-18 07:19:24.865+0000: 8854: info : virObjectNew:202 : OBJECT_NEW: obj=0x557a035a22a0 classname=virNetDaemon
2017-04-18 07:19:24.865+0000: 8854: info : virEventPollAddHandle:140 : EVENT_POLL_ADD_HANDLE: watch=1 fd=5 events=1 cb=0x557a0188da60 opaque=(nil) ff=(nil)
2017-04-18 07:19:24.865+0000: 8854: info : virObjectRef:296 : OBJECT_REF: obj=0x557a035a2ec0
2017-04-18 07:19:24.865+0000: 8854: info : virObjectNew:202 : OBJECT_NEW: obj=0x557a035a2950 classname=virLogHandler
2017-04-18 07:19:24.865+0000: 8854: info : virObjectNew:202 : OBJECT_NEW: obj=0x557a035a3020 classname=virNetServerService
2017-04-18 07:19:24.865+0000: 8854: info : virObjectNew:202 : OBJECT_NEW: obj=0x557a035a3ea0 classname=virNetSocket
2017-04-18 07:19:24.865+0000: 8854: info : virNetSocketNew:292 : RPC_SOCKET_NEW: sock=0x557a035a3ea0 fd=7 errfd=-1 pid=0 localAddr=127.0.0.1;0, remoteAddr=<null>
......
As shown above, there are info logs printed.
Actual results:
"virtlogd --verbose" doesn't output verbose messages when log_level is not set or set to 3/4.
Expected results:
"virtlogd --verbose" can output verbose messages when log_level is not set or set to 3/4, which is equal to setting log_level=2
Fixed upstream by:
commit b988f794e307fc6421ea7b13292a048bdca94f6a
Refs: v3.6.0-216-gb988f794e
Author: Erik Skultety <eskultet>
AuthorDate: Fri Aug 25 16:58:51 2017 +0200
Commit: Erik Skultety <eskultet>
CommitDate: Mon Aug 28 16:42:13 2017 +0200
daemon: logging: Fix --verbose option being ignored by the daemon
Commit 94c465d0 refactored the logging setup phase but introduced an
issue, where the daemon ignores verbose mode when there are no outputs
defined and the default must be used. The problem is that the default
output was determined too early, thus ignoring the potential '--verbose'
option taking effect. This patch postpones the creation of the default
output to the very last moment when nothing else can change. Since the
default output is only created during the init phase, it's safe to leave
the pointer as NULL for a while, but it will be set eventually, thus not
affecting runtime.
Patch also adjusts both the other daemons.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442947
Signed-off-by: Erik Skultety <eskultet>
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2018:0704