Hide Forgot
Description of problem: if disable debug option, virt-who should show the message as: "Sending update in hosts-to-guests mapping: 1 hypervisors and 1 guests found" but if I disabled debug option for local libvirt mode, the json mapping info still can output. Version-Release number of selected component (if applicable): virt-who-0.16-1.el6.noarch How reproducible: always Steps to Reproduce: 1. Disabled debug option, run virt-who for local libvirt mode, such as: # virt-who -o 2015-12-30 13:45:46,814 INFO: Using reporter_id='hp-z220-09.qe.lab.eng.nay.redhat.com' 2015-12-30 13:45:46,815 INFO: No configurations found, using libvirt as backend 2015-12-30 13:45:46,815 INFO: Using configuration "env/cmdline" ("libvirt" mode) 2015-12-30 13:45:46,906 INFO: Using libvirt url: "" 2015-12-30 13:45:47,427 INFO: Sending domain info: [ { "guestId": "8daf9faa-7e43-754b-4bce-bc12c0e02e61", "state": 3, "attributes": { "active": 1, "hypervisorVersion": "0.12.1", "virtWhoType": "libvirt", "hypervisorType": "QEMU" } } ] 2015-12-30 13:45:48,974 INFO: virt-who guest list update successful 2.Enabled debug option, run virt-who for local libvirt mode: # virt-who -o -d 2015-12-30 13:46:47,877 [virtwho.init INFO] MainProcess(17095):MainThread @virtwho.py:parseOptions:720 - Using reporter_id='hp-z220-09.qe.lab.eng.nay.redhat.com' 2015-12-30 13:46:47,878 [virtwho.init INFO] MainProcess(17095):MainThread @virtwho.py:main:804 - No configurations found, using libvirt as backend 2015-12-30 13:46:47,878 [virtwho.init INFO] MainProcess(17095):MainThread @virtwho.py:main:811 - Using configuration "env/cmdline" ("libvirt" mode) 2015-12-30 13:46:47,963 [virtwho.env_cmdline DEBUG] Libvirtd-1(17101):MainThread @virt.py:run:338 - Virt backend 'env/cmdline' started 2015-12-30 13:46:47,965 [virtwho.env_cmdline INFO] Libvirtd-1(17101):MainThread @libvirtd.py:_connect:156 - Using libvirt url: "" 2015-12-30 13:46:47,973 [virtwho.env_cmdline DEBUG] Libvirtd-1(17101):MainThread @libvirtd.py:_listDomains:228 - Virtual machine found: rhel6.7-vm1: 8daf9faa-7e43-754b-4bce-bc12c0e02e61 2015-12-30 13:46:47,973 [virtwho.env_cmdline DEBUG] Libvirtd-1(17101):MainThread @libvirtd.py:_listDomains:238 - Libvirt domains found: 8daf9faa-7e43-754b-4bce-bc12c0e02e61 2015-12-30 13:46:47,973 [virtwho.env_cmdline DEBUG] Libvirtd-1(17101):MainThread @virt.py:enqueue:331 - Report gathered, putting to queue for sending 2015-12-30 13:46:47,975 [virtwho.main DEBUG] MainProcess(17095):MainThread @virtwho.py:update_report_to_send:274 - Report for config "env/cmdline" updated 2015-12-30 13:46:47,979 [virtwho.main DEBUG] MainProcess(17095):MainThread @subscriptionmanager.py:_connect:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2015-12-30 13:46:48,192 [virtwho.main INFO] MainProcess(17095):MainThread @subscriptionmanager.py:sendVirtGuests:136 - Sending domain info: [ { "guestId": "8daf9faa-7e43-754b-4bce-bc12c0e02e61", "state": 3, "attributes": { "active": 1, "hypervisorVersion": "0.12.1", "virtWhoType": "libvirt", "hypervisorType": "QEMU" } } ] 2015-12-30 13:46:48,975 [virtwho.env_cmdline DEBUG] Libvirtd-1(17101):MainThread @virt.py:run:357 - Virt backend 'env/cmdline' stopped after sending one report 2015-12-30 13:46:49,722 [virtwho.main INFO] MainProcess(17095):MainThread @virtwho.py:_sendGuestList:250 - virt-who guest list update successful 2015-12-30 13:46:49,723 [virtwho.main DEBUG] MainProcess(17095):MainThread @virtwho.py:send_current_report:206 - Report for config "env/cmdline" sent 2015-12-30 13:46:49,724 [virtwho.main DEBUG] MainProcess(17095):MainThread @virtwho.py:<module>:890 - virt-who terminated 2015-12-30 13:46:49,725 [virtwho.main DEBUG] MainProcess(17095):MainThread @virtwho.py:terminate:413 - virt-who is shutting down Actual results: if disabled debug option, the json mapping info still can output for local libvirt mode Expected results: if disabled debug option,the json mapping info shouldn't output, and will show as: " Sending update in hosts-to-guests mapping: 1 hypervisors and 1 guests found " Additional info: the remote libvirt mode is ok, enable debug, will show json info disable debug, will show " "
Fixed in virt-who-0.16-2.el6.
Verified it on virt-who-0.16-3.el6.noarch since debug info won't exit when disabled debug option. Verified version: virt-who-0.16-3.el6.noarch subscription-manager-1.16.8-1.el6.x86_64 python-rhsm-1.16.6-1.el6.x86_64 Verified processes: 1. Disabled debug option, run virt-who for local libvirt mode, virt-who won't send the Json mapping info. [root@intel-canoepass-10 ~]# virt-who -o 2016-02-04 02:47:53,742 INFO: Using reporter_id='intel-canoepass-10.lab.bos.redhat.com' 2016-02-04 02:47:53,747 INFO: No configurations found, using libvirt as backend 2016-02-04 02:47:53,748 INFO: Using configuration "env/cmdline" ("libvirt" mode) 2016-02-04 02:47:53,915 INFO: Using libvirt url: "" 2016-02-04 02:47:54,211 INFO: Sending update in guests lists for config "env/cmdline": 1 guests found 2. Diable debug option in /etc/sysconfig/virt-who, restart virt-who service, virt-who won't send the Json mapping info. [root@intel-canoepass-10 ~]# cat /etc/sysconfig/virt-who | grep -v ^# | grep -v ^$ VIRTWHO_DEBUG=0 [root@intel-canoepass-10 ~]# service virt-who restart Stopping virt-who: [FAILED] Starting virt-who: [ OK ] [root@intel-canoepass-10 ~]# tail -f /var/log/rhsm/rhsm.log 2016-02-04 02:48:08,664 [INFO] @virtwho.py:630 - Using reporter_id='intel-canoepass-10.lab.bos.redhat.com' 2016-02-04 02:48:08,667 [INFO] @virtwho.py:714 - No configurations found, using libvirt as backend 2016-02-04 02:48:08,668 [INFO] @virtwho.py:721 - Using configuration "env/cmdline" ("libvirt" mode) 2016-02-04 02:48:08,849 [INFO] @libvirtd.py:156 - Using libvirt url: "" 2016-02-04 02:48:09,154 [INFO] @subscriptionmanager.py:147 - Sending update in guests lists for config "env/cmdline": 1 guests found Result: Virt-who won't send json mapping info when disable debug info.Therefore, verified it.
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://rhn.redhat.com/errata/RHEA-2016-0859.html