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 1294746 - Disabled debug option for virt-who local libvirt mode, the mapping json info still can be showed
Summary: Disabled debug option for virt-who local libvirt mode, the mapping json info ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.8
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-30 05:52 UTC by Eko
Modified: 2016-12-01 00:35 UTC (History)
4 users (show)

Fixed In Version: virt-who-0.16-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 23:57:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0859 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2016-05-10 22:44:47 UTC

Description Eko 2015-12-30 05:52:47 UTC
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 " "

Comment 2 Radek Novacek 2016-01-28 13:04:42 UTC
Fixed in virt-who-0.16-2.el6.

Comment 4 Liushihui 2016-02-04 07:55:29 UTC
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.

Comment 6 errata-xmlrpc 2016-05-10 23:57:05 UTC
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


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