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 1272149 - filter_host_uuid skips all hosts when hypervisor_id set to hostname
Summary: filter_host_uuid skips all hosts when hypervisor_id set to hostname
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.7
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: gaoshang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-15 14:58 UTC by Robert
Modified: 2016-12-01 00:32 UTC (History)
3 users (show)

Fixed In Version: virt-who-0.16-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 23:56:42 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 Robert 2015-10-15 14:58:45 UTC
Description of problem:
If the config parameter hypervisor_id is set to hostname, adding uuid's to the config parameter filter_host_uuids causes virt-who to skip all hypervisors instead of returning data for the hypervisors whose uuid is listed in the filter_host_uuids parameter.

This might be a documentation error, because if you use the hypervisor hostname instead of uuid with filter_host_uuids it does filter correctly, returning only the hostnames listed in the filter_host_uuids parameter.

The man page states...
"filter_host_uuids - Only hosts which uuid is specified in comma-separated list in this option will be reported. Put the uuid into the double-quotes if it contains special characters (like comma)."

Version-Release number of selected component (if applicable):
virt-who.noarch   0.12-10.el6  @rhel-6-server-rpms

How reproducible:
You can reproduce the behavior by changing the config file 3 times and running virt-who.

Steps to Reproduce:
Data is imported into satellite 6.1.2
For all 3 cases below I run virt-who as a service but have it configured to run in single-shot mode. I've made these changes to the standard /etc/sysconfig/virt-who file.
VIRTWHO_BACKGROUND=0
VIRTWHO_DEBUG=1
VIRTWHO_ONE_SHOT=1
VIRTWHO_SAM=0
VIRTWHO_SATELLITE6=1

Between test cases I delete any records that were imported into satellite.

1. Configure the file /etc/virt-who.d/config as noted below and run virt who. It will return data for the one hypervisor that matches the listed uuid. In this case virt-who works as expected.

[vcenter1]
type=esx
server=xxx.xxx.xxx.xxx
username=ro-user
password=pw123456
owner="Production"
env=Library
hypervisor_id=uuid
filter_host_uuids=fb04u59a-fa43-e411-0002-00000000000e

2.  Configure the file /etc/virt-who.d/config as noted below and run virt who. It will skip all hypervisors and not return sny data for the one uuid listed in the filter list. In this case virt-who does not work as expected.

[vcenter1]
type=esx
server=xxx.xxx.xxx.xxx
username=ro-user
password=pw123456
owner="Production"
env=Library
hypervisor_id=hostname
filter_host_uuids=fb04u59a-fa43-e411-0002-00000000000e

3. Configure the file /etc/virt-who.d/config as noted below and run virt who. It will return data for the one hypervisor that matches the listed hostname. In this case virt-who does return data but based on the name of the parameter and the virt-who-config man page I was expecting to supply the uuid not a hostname.

[vcenter1]
type=esx
server=xxx.xxx.xxx.xxx
username=ro-user
password=pw123456
owner="Production"
env=Library
hypervisor_id=hostname
filter_host_uuids=server01.verizon.com

Actual results:
In the first case data was returned as expected when filtering by uuid. The second case there was no data returned when filtering by uuid. The third case data was returned unexpectedly when I used hostname instead of uuid in the filter list


Expected results:
Based on the parameter name and the virt-who-config man page I expected the data returned to be filtered by uuid regardless of how hypervisor_id was set.


Additional info:
As noted above this might simply be fixed by updating the man page for virt-who-config but it might be considered a bug too, I'm not sure. Now that I figured out to use hostname in the filter list when I set hypervisor_id=hostname I'm good to go but since I got stuck on this I thought I should bring it to your attention and maybe it will save someone else from getting stuck!

Comment 2 Radek Novacek 2015-12-08 11:55:06 UTC
Thank you for the report. I think that filtering the hosts by hostname when hypervisor_id is hostname makes more sense. If you are reporting hypervisors by hostname, you'll see the machine hostname in the UI (e.g. Satellite). So it make sense to filter by it.

The change has been applied upstream and will be part of rebased virt-who package.

https://github.com/virt-who/virt-who/commit/fc063bf3c075f7f7d3a05f4f381d5f4a13653edb

Comment 3 Radek Novacek 2015-12-17 12:28:35 UTC
Fixed by rebase to virt-who-0.16-1.el6.

Comment 5 Liushihui 2016-02-25 06:19:16 UTC
Verified it on virt-who-0.16-4.el6.noarch since man page has been updated and make "filter_host_uuids" attribution more clearly. Therefore,verify it.

[root@sgi-xe500-01 ~]# man virt-who-config
filter_host_uuids
   Only  hosts  which  uuid (or hostname or hwuuid, based on hypervisor_id) is specified in comma-separated list in this option will be reported. Put the value into the double-quotes  if  it  contains  special  characters  (like comma).

Comment 7 errata-xmlrpc 2016-05-10 23:56:42 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.