Bug 1315547

Summary: virt-who still print null mapping info to stdout when hyperv mode with "hypervisor_id=hwuuid"
Product: Red Hat Enterprise Linux 6 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: gxing, lmiksik, ovasik, rbalakri, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.16-7.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 23:57:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Liushihui 2016-03-08 02:27:36 UTC
Description of problem:
When configure virt-who run at hyperv mode with hypervisor_id=hwuuid, then run virt-who with "-p -d" parameter, it still print null mapping info to the stdout

Version-Release number of selected component (if applicable):
virt-who-0.16-5.el6.noarch
subscription-manager-1.16.8-3.el6.x86_64
python-rhsm-1.16.6-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Register system to satellite6.1 and stop virt-who service
2. Configure virt-who at hyperv mode with "hypervisor_id=hwuuid"
[root@sgi-xe270-01 ~]# cat /etc/virt-who.d/hyperv 
[test-hyperv1]
type=hyperv
server=10.73.5.227
username=administrator
password=Welcome1
owner="Default Organization"
env=Library
hypervisor_id=hwuuid
3. Run "virt-who -p -d " to  print mapping info to the stdout
[root@sgi-xe270-01 ~]# virt-who -p -d
2016-03-07 21:23:51,897 [virtwho.init INFO] MainProcess(31987):MainThread @virtwho.py:parseOptions:630 - Using reporter_id='sgi-xe270-01.rhts.eng.bos.redhat.com'
2016-03-07 21:23:51,901 [virtwho.init DEBUG] MainProcess(31987):MainThread @virtwho.py:__init__:125 - Using config named 'test-hyperv1'
2016-03-07 21:23:51,901 [virtwho.init INFO] MainProcess(31987):MainThread @virtwho.py:main:722 - Using configuration "test-hyperv1" ("hyperv" mode)
2016-03-07 21:23:52,049 [virtwho.test-hyperv1 DEBUG] MainProcess(31987):MainThread @hyperv.py:__init__:473 - Hyper-V url: http://10.73.5.227:5985/wsman
2016-03-07 21:23:52,053 [virtwho.test-hyperv1 DEBUG] HyperV-1(31994):MainThread @virt.py:run:358 - Virt backend 'test-hyperv1' started
2016-03-07 21:23:53,426 [virtwho.test-hyperv1 DEBUG] HyperV-1(31994):MainThread @hyperv.py:retry_ntlm_negotitate:67 - Using NTLM authentication
2016-03-07 21:23:54,664 [virtwho.test-hyperv1 DEBUG] HyperV-1(31994):MainThread @hyperv.py:retry_ntlm_authenticate:80 - Sending NTLM authentication data
2016-03-07 21:23:55,322 [virtwho.test-hyperv1 DEBUG] HyperV-1(31994):MainThread @hyperv.py:retry_ntlm_authenticate:103 - NTLM authentication successful
2016-03-07 21:23:55,332 [virtwho.test-hyperv1 DEBUG] HyperV-1(31994):MainThread @hyperv.py:getHostGuestMapping:521 - Unable to enumerate using root/virtualization namespace, trying root/virtualization/v2 namespace
2016-03-07 21:24:07,364 [virtwho.test-hyperv1 ERROR] HyperV-1(31994):MainThread @virt.py:run:368 - Virt backend 'test-hyperv1' fails with error: Reporting of hypervisor hwuuid is not implemented in hyperv backend
2016-03-07 21:24:07,365 [virtwho.test-hyperv1 DEBUG] HyperV-1(31994):MainThread @virt.py:enqueue:351 - Report gathered, putting to queue for sending
2016-03-07 21:24:07,365 [virtwho.test-hyperv1 DEBUG] HyperV-1(31994):MainThread @virt.py:run:377 - Virt backend 'test-hyperv1' stopped after sending one report
{"hypervisors": []}
2016-03-07 21:24:07,367 [virtwho.main WARNING] MainProcess(31987):MainThread @virtwho.py:run:302 - Unable to collect report for config "test-hyperv1"
2016-03-07 21:24:07,369 [virtwho.main DEBUG] MainProcess(31987):MainThread @virtwho.py:_main:781 - Associations found: {
    "hypervisors": []
}
2016-03-07 21:24:07,369 [virtwho.main DEBUG] MainProcess(31987):MainThread @virtwho.py:<module>:814 - virt-who terminated
2016-03-07 21:24:07,370 [virtwho.main DEBUG] MainProcess(31987):MainThread @virtwho.py:terminate:352 - virt-who is shutting down

Actual results:
Virt-who still print null mapping info to the stdout

Expected results:
As it has reported "hypervisor hwuuid is not implemented in hyperv", it needn't to report any mapping info to stdout

Additional info:

Comment 1 Radek Novacek 2016-03-10 18:26:29 UTC
Fixed in virt-who-0.16-7.el6.

Comment 3 Liushihui 2016-03-24 02:36:31 UTC
Verified it on virt-who-0.16-7.el6 since it will print error info when virt-who run at hyperv mode with hypervisor_id=hwuuid. Therefore, verify it.

[root@dell-pem600-01 ~]# virt-who -p -d
2016-03-23 22:31:32,963 [virtwho.test-hyperv1 ERROR] HyperV-1(24714):MainThread @virt.py:run:368 - Virt backend 'test-hyperv1' fails with error: Reporting of hypervisor hwuuid is not implemented in hyperv backend
2016-03-23 22:31:32,963 [virtwho.test-hyperv1 DEBUG] HyperV-1(24714):MainThread @virt.py:enqueue:351 - Report for config "test-hyperv1" gathered, putting to queue for sending
2016-03-23 22:31:32,964 [virtwho.test-hyperv1 DEBUG] HyperV-1(24714):MainThread @virt.py:run:377 - Virt backend 'test-hyperv1' stopped after sending one report
2016-03-23 22:31:32,965 [virtwho.main WARNING] MainProcess(24707):MainThread @virtwho.py:run:306 - Unable to collect report for config "test-hyperv1"
2016-03-23 22:31:32,969 [virtwho.main ERROR] MainProcess(24707):MainThread @virtwho.py:_main:770 - No hypervisor reports found
2016-03-23 22:31:32,969 [virtwho.main DEBUG] MainProcess(24707):MainThread @virtwho.py:<module>:824 - virt-who terminated
2016-03-23 22:31:32,969 [virtwho.main DEBUG] MainProcess(24707):MainThread @virtwho.py:terminate:359 - virt-who is shutting down

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