Bug 673226 - Imprint libvirt logs with version number & RPM build details
Summary: Imprint libvirt logs with version number & RPM build details
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-27 18:53 UTC by Daniel Berrangé
Modified: 2011-08-24 02:57 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.8.7-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:26:26 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description Daniel Berrangé 2011-01-27 18:53:39 UTC
Description of problem:
Bug reporters often don't tell the entire truth about what version of libvirt they tested with. To make this clear we should follow the example of the kernel dmesg output, and log the libvirt version number & RPM build details as the first line of any log output.

The core info we want is libvirt version, RPM release

And to catch people who take the RPM and rebuild it without changing release field, we also want the build date, packager & build hostname.


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

How reproducible:
Always

Steps to Reproduce:
1. Edit /etc/libvirt/libvirtd.conf and enable log_filters / log_outputs settings
1. LIBVIRT_DEBUG=1 virsh list
2.
3.
  
Actual results:
$ LIBVIRT_DEBUG=1 virsh
18:13:28.013: 17536: debug : virInitialize:361 : register drivers


Expected results:
$ LIBVIRT_DEBUG=1 virsh
 18:14:52.086: 17551: info : libvirt version: 0.8.7, package: 1.fc13 (Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10)
 18:14:52.086: 17551: debug : virInitialize:361 : register drivers

The /var/log/messages (or whereever libvirtd logs to) should also show the same version data if libvirtd has logging enabled.


Additional info:

Comment 1 Daniel Berrangé 2011-01-27 18:54:15 UTC
Proof of concept

http://www.redhat.com/archives/libvir-list/2011-January/msg01148.html

Comment 4 zhanghaiyan 2011-02-17 02:47:18 UTC
Verified with 
libvirt-0.8.7-6.el6
qemu-kvm-0.12.1.2-2.144.el6
kernel-2.6.32-113.el6
Now the log print libvirt version and rpmbuild details
1.
# LIBVIRT_DEBUG=1 virsh list
21:25:31.596: 3414: info : libvirt version: 0.8.7, package: 6.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-02-11-11:31:35, hs20-bc2-4.build.redhat.com)
21:25:31.596: 3414: debug : virInitialize:361 : register drivers
21:25:31.596: 3414: debug : virRegisterDriver:969 : registering Test as driver 0

2.Edit /etc/libvirt/libvirtd.conf and enable log_filters / log_outputs
settings and look at the log file
21:28:20.001: 3958: info : libvirt version: 0.8.7, package: 6.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-02-11-11:31:35, hs20-bc2-4.build.redhat.com)
21:28:20.001: 3958: debug : virHookCheck:114 : No hook script /etc/libvirt/hooks/daemon
21:28:20.001: 3958: debug : virHookCheck:114 : No hook script /etc/libvirt/hooks/qemu
21:28:20.001: 3958: debug : virHookCheck:114 : No hook script /etc/libvirt/hooks/lxc

Comment 7 errata-xmlrpc 2011-05-19 13:26:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html


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