Bug 1447022

Summary: virt-who doesn't collect the information when 'hypervisor_id=hostname' is set and hosts are filtered by UUID.
Product: Red Hat Enterprise Linux 7 Reporter: Amar Huchchanavar <ahuchcha>
Component: virt-whoAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: ahuchcha, jhnidek, khowell, wpoteat, yuefliu
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:47:13 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 Amar Huchchanavar 2017-05-01 08:57:43 UTC
Description of problem:
Virt-who could not read the guest-host mappings if 'hypervisor_id=hostname' and 'filter_host_uuids' are present in the configuration file.

'filter_host_uuids' is not compatible with 'hypervisor_id=hostname' option. We need to use 'filter_hosts=' to filter hosts.

Version-Release number of selected component (if applicable):
virt-who-0.17-11.el7_3.noarch

How reproducible:
Always

Steps to Reproduce:
1.Configure virt-who with below settings.
[howst-vcspv01]
type=esx
[all other details]
hypervisor_id=hostname
filter_host_uuids="446e2e7d-825a-5ca0-8cee-13ae9f56c903","4a9d7c0f-7058-4afd-8d06-42661872b48c","118f4087-7535-4187-8bc2-8e07fc676156"
2.Try to report the mappings.#virt-who -o -d


Actual results:
It fails to read the mappings,
~~~
017-04-21 15:07:53,606 [virtwho.main INFO] MainProcess(3074):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Sending update in hosts-to-guests mapping for config "vcenter1": 0 hypervisors and 0 guests found
~~~

Expected results:
It should throw syntax error.

If  'hypervisor_id=hostname' option is present in the file, 
then force to use below two options:

filter_hosts="host1.example.com","host2.example.com","host3.example.com"  `OR`
exclude_hosts=host1.example.com,host2.example.com,host3.example.com

[filter_hosts - If provided, only hosts with hostnames in this list will be reported,
exclude_hosts - If provided, do not report hosts with hostnames in this list.]

Comment 2 Kevin Howell 2017-05-04 14:28:29 UTC
filter_hosts should work with hypervisor_id=hostname.

Comment 3 Kevin Howell 2017-05-04 14:29:11 UTC
we'll try to address as part of upcoming config linting changes

Comment 9 errata-xmlrpc 2018-10-30 10:47:13 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://access.redhat.com/errata/RHBA-2018:3169