Bug 1311831 - [RFE] Suggest to add "filter_hostname" and "filter_host_hwuuid" in virt-who config file
Summary: [RFE] Suggest to add "filter_hostname" and "filter_host_hwuuid" in virt-who c...
Keywords:
Status: CLOSED WONTFIX
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: 1269194 1355878 1359264
TreeView+ depends on / blocked
 
Reported: 2016-02-25 06:46 UTC by Liushihui
Modified: 2020-07-16 08:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-07 15:13:19 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


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