Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1311831

Summary: [RFE] Suggest to add "filter_hostname" and "filter_host_hwuuid" in virt-who config file
Product: Red Hat Enterprise Linux 6 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED WONTFIX QA Contact: Eko <hsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: gxing, hsun, ovasik, rbalakri, salmy, sgao, shihliu, wharris
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-07 15:13:19 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:
Bug Depends On:    
Bug Blocks: 1269194, 1355878, 1359264    

Description Liushihui 2016-02-25 06:46:43 UTC
Description of problem:
In order to make the config more clearly, suggest to add "filter_hostname" to filter host by hostname. and add "filter_host_hwuuid" to filter host by hwuuid.

Version-Release number of selected component (if applicable):
virt-who-0.16-4.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Set "filter_host_uuids=XXXX and hypervisor_id=hostname" in etc/virt-who.d/XXX can filter host by hostname.
2. Set "filter_host_uuids=XXXX and hypervisor_id=hwuuid" in etc/virt-who.d/XXX can filter host by hwuuid.

Actual results:
"filter_host_uuids" can specify hosts  which  uuid (or hostname or hwuuid, based on hypervisor_id) is specified in comma-separated list in this option will be reported.

Expected results:
In order to increase config file's readability, I suggest to add "filter_hostname" and "filter_host_hwuuid" as the following:
1. Suggest to set "filter_hostname=XXX and hypervisor_id=hostname" in /etc/virt-who.d/XXX to filter host by hostname.
2.Suggest to set "filter_hwuuid=XXX and hypervisor_id=hwuuid" to filter host by hwuuid.

Additional info:

Comment 1 Radek Novacek 2016-02-25 08:02:17 UTC
It's too late for 6.8, lets move it to 6.9.

Comment 2 Radek Novacek 2016-05-05 15:14:14 UTC
I don't think this change will make things more clear. Adding two more options would only cause more confusion (four actually, there is also exclude_host_uuids).


We've already documented the behaviour in the manual page:

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).


We could rename this option to something like `filter_hosts` or `filter_host_by_id`, but I'm not sure it worth the effort.

Opinions?

Comment 3 Liushihui 2016-05-06 01:59:06 UTC
Radek, I agree with you to modify "filter_host_uuids" to "filter_hosts", it should be more clear for customer. Thanks.

Comment 4 Radek Novacek 2016-05-10 08:45:22 UTC
The option is renamed upstream, the old variant (filter_host_uuids) is still there for backwards compatibility.

Same applies to exclude_ variant (exclude_host_uuids -> exclude_hosts).

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