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 1192217 - [RFE] Provide a means for virt-who to query only specific virtualization clusters
Summary: [RFE] Provide a means for virt-who to query only specific virtualization clus...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: gaoshang
Laura Novich
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-12 21:52 UTC by Rich Jerrido
Modified: 2020-02-14 17:28 UTC (History)
8 users (show)

Fixed In Version: virt-who-0.12-1.el6
Doc Type: Release Note
Doc Text:
virt-who supports cluster filtering With this update, the virt-who service introduces a filtering mechanism for the Subscription Manager reports. As a result, users can now choose which clusters virt-who should display according to the specified parameters. For example, hosts that do not run any Red Hat Enterprise Linux guests, or hosts that run guests of a specified version of Red Hat Enterprise Linux.
Clone Of:
Environment:
Last Closed: 2015-07-22 07:15:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1377 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2015-07-20 17:58:35 UTC

Description Rich Jerrido 2015-02-12 21:52:03 UTC
Description of problem:
As a user of virt-who, I would like the ability to limit the virtualization clusters that virt-who queries for host/guest mapping. 

Currently today, in large virtualization environments, virt-who reports all hypervisors to the subscription management system (SAM/Satellite). This becomes very messy in the UI as it shows systems that the end-user does not (and the user does not plan to) have RHEL guests running on. 

This RFE requests the ability to configure virt-who to support a subset of clusters, provided in a list format. 

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

Expected results:

A new option, such as 

VIRTWHO_ESX_CLUSTERS=ClusterA,ClusterB,foo,bar,baz

Is what is desired.

Comment 2 Radek Novacek 2015-02-27 11:15:32 UTC
This feature is now implemented upstream like this: there are two options that affects which hosts are filtered according to its parent:

filter_host_parents - if provided, only hosts with parent name (usually ComputeResource) in this list will be reported,
exclude_host_parents - do not report hosts with parent name in this list.

There are also similar options for filtering by host uuids.

Is this acceptable?

Comment 3 Radek Novacek 2015-02-27 19:42:59 UTC
Fixed by rebase to virt-who-0.12-1.el6.

Comment 5 Liushihui 2015-04-10 08:02:35 UTC
Verified it on virt-who-0.12-2.el6.noarch, virt-who can filter out specific ComputeResource with "filter_host_parents" and "exclude_host_parents".

Verified version:
virt-who-0.12-2.el6.noarch
subscription-manager-1.14.1-1.el6.x86_64

Verified process:
Precondition:There are two esx hosts under two datacenter in the vcenter.
1.Register system to SAM server
2.Configure virt-who run at esx mode and configure a computerResource which can be filtered.
[root@hp-z220-06 virt-who.d]# cat /etc/virt-who.d/vir 
[test-esx1]
type=esx
server=10.66.79.72
username=Administrator
password=qwer1234P!
owner=ACME_Corporation
env=Library
filter_host_parents="domain-s98"
3.Check the virt-who's log, virt-who can send the specific computerResource to SAM
2015-04-10 15:52:39,299 [DEBUG]  @virtwho.py:84 - Using config named 'test-esx1'
2015-04-10 15:52:39,300 [INFO]  @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-10 15:52:39,300 [DEBUG]  @virtwho.py:131 - Starting infinite loop with 10 seconds interval
2015-04-10 15:52:39,430 [DEBUG]  @esx.py:51 - Log into ESX
2015-04-10 15:52:40,528 [DEBUG]  @esx.py:54 - Creating ESX event filter
2015-04-10 15:52:40,849 [DEBUG]  @esx.py:131 - Skipping host 'host-124' because its parent 'domain-c122' is not included
2015-04-10 15:52:40,849 [DEBUG]  @esx.py:113 - Waiting for ESX changes
2015-04-10 15:52:40,871 [INFO]  @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {86b2bd00-8bad-11e2-87f4-6c3be514699d: [4224e5d2-4fcf-2bc2-2559-5846035d3a78, 4224a77f-1c50-42cb-3507-2b68b447ed60]}
2015-04-10 15:52:40,871 [DEBUG]  @subscriptionmanager.py:76 - Authenticating with certificate: /etc/pki/consumer/cert.pem
4. stop virt-who service, then configure virt-who filter out two computerResource.
[root@hp-z220-06 virt-who.d]# cat /etc/virt-who.d/vir 
[test-esx1]
type=esx
server=10.66.79.72
username=Administrator
password=qwer1234P!
owner=ACME_Corporation
env=Library
filter_host_parents="domain-s98","domain-c122"
5. Restart virt-who service can check the virt-who's log, virt-who can send the two specific computerResource to SAM 
2015-04-10 15:48:39,885 [DEBUG]  @virtwho.py:84 - Using config named 'test-esx1'
2015-04-10 15:48:39,886 [INFO]  @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-10 15:48:39,886 [DEBUG]  @virtwho.py:131 - Starting infinite loop with 10 seconds interval
2015-04-10 15:48:40,019 [DEBUG]  @esx.py:51 - Log into ESX
2015-04-10 15:48:41,117 [DEBUG]  @esx.py:54 - Creating ESX event filter
2015-04-10 15:48:41,443 [DEBUG]  @esx.py:113 - Waiting for ESX changes
2015-04-10 15:48:41,461 [INFO]  @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-994a-6c3be51d959a: [], 86b2bd00-8bad-11e2-87f4-6c3be514699d: [4224e5d2-4fcf-2bc2-2559-5846035d3a78, 4224a77f-1c50-42cb-3507-2b68b447ed60]}
2015-04-10 15:48:41,462 [DEBUG]  @subscriptionmanager.py:76 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-04-10 15:48:42,615 [INFO]  @virtwho.py:127 - Created host: 2c90b4ac-a1e1-4ac8-8606-2ee84cec0803 with guests: [4224e5d2-4fcf-2bc2-2559-5846035d3a78, 4224a77f-1c50-42cb-3507-2b68b447ed60]
2015-04-10 15:48:42,615 [INFO]  @virtwho.py:127 - Created host: 8adaae82-83af-4357-9a8b-2cc9a5c1cdfe with guests: []
6. stop virt-who service, then configure virt-who filter out two computerResource.
[root@hp-z220-06 virt-who.d]# cat /etc/virt-who.d/vir 
[test-esx1]
type=esx
server=10.66.79.72
username=Administrator
password=qwer1234P!
owner=ACME_Corporation
env=Library
exclude_host_parents="domain-s98"
7. Restart virt-who service, check the virt-who's log, virt-who can't send specific computerResource to SAM 
2015-04-10 15:57:50,195 [DEBUG]  @virtwho.py:84 - Using config named 'test-esx1'
2015-04-10 15:57:50,195 [INFO]  @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-10 15:57:50,195 [DEBUG]  @virtwho.py:131 - Starting infinite loop with 10 seconds interval
2015-04-10 15:57:50,324 [DEBUG]  @esx.py:51 - Log into ESX
2015-04-10 15:57:51,428 [DEBUG]  @esx.py:54 - Creating ESX event filter
2015-04-10 15:57:51,752 [DEBUG]  @esx.py:128 - Skipping host 'host-100' because its parent 'domain-s98' is excluded
2015-04-10 15:57:51,753 [DEBUG]  @esx.py:113 - Waiting for ESX changes
2015-04-10 15:57:51,769 [INFO]  @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-994a-6c3be51d959a: []}
2015-04-10 15:57:51,770 [DEBUG]  @subscriptionmanager.py:76 - Authenticating with certificate: /etc/pki/consumer/cert.pem

Result: According to step3,step5,step7's result, virt-who can query specific computerResource with "filter_host_parents" and "exclude_host_parents". Therefore, Verify it on virt-who-0.12-2.el6.noarch

Comment 7 errata-xmlrpc 2015-07-22 07:15:50 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/RHBA-2015-1377.html


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