Bug 1184665
| Summary: | RFE: allow filtering which hosts are sent by virt-who | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | jalviso <jalviso> |
| Component: | virt-who | Assignee: | Radek Novacek <rnovacek> |
| Status: | CLOSED ERRATA | QA Contact: | gaoshang <sgao> |
| Severity: | high | Docs Contact: | Laura Novich <lnovich> |
| Priority: | unspecified | ||
| Version: | 6.7 | CC: | gxing, jherrman, jhradile, ovasik, rbalakri, rnovacek, shihliu, tlavigne, xdmoon |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | virt-who-0.12-1.el6 | Doc Type: | Release Note |
| Doc Text: |
Filtering for hypervisors reported by virt-who
The virt-who service introduces a filtering mechanism for the Subscription Manager reports. As a result, users can now choose which hosts virt-who should display according to the specified parameters. For example, they can filter out 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.
|
Story Points: | --- |
| Clone Of: | 1163608 | Environment: | |
| Last Closed: | 2015-07-22 07:15:45 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: | 1163608, 1259295 | ||
| Bug Blocks: | |||
|
Comment 3
Radek Novacek
2015-02-27 11:08:22 UTC
Fixed by rebase to virt-who-0.12-1.el6. CCS has determined that this bug should be described in the RHEL 6.7 Release Notes. Please update the Doc Text field with a summary feature description. On the virt-who-0.12-2.el6.noarch, virt-who can filter out one host, but it's failed to filter out multi-hosts, Therefore, reopen it.
Checked version:
virt-who-0.12-2.el6.noarch
subscription-manager-1.14.1-1.el6.x86_64
Checked process:
Precondition:There are two esx hosts in this vcenter.
1.Register system to SAM server
2.Configure virt-who run at esx mode and configure a host 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_uuids="86b2bd00-8bad-11e2-87f4-6c3be514699d"
3. Restart virt-who service , check the virt-who log, it can filter out ""86b2bd00-8bad-11e2-87f4-6c3be514699d""
2015-04-10 14:49:53,246 [DEBUG] @virtwho.py:84 - Using config named 'test-esx1'
2015-04-10 14:49:53,246 [INFO] @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-10 14:49:53,246 [DEBUG] @virtwho.py:131 - Starting infinite loop with 10 seconds interval
2015-04-10 14:49:53,378 [DEBUG] @esx.py:51 - Log into ESX
2015-04-10 14:49:54,500 [DEBUG] @esx.py:54 - Creating ESX event filter
2015-04-10 14:49:54,820 [DEBUG] @esx.py:113 - Waiting for ESX changes
2015-04-10 14:49:54,840 [DEBUG] @virt.py:89 - Skipping host 'aee4ff00-8c33-11e2-994a-6c3be51d959a' because its uuid is not included
2015-04-10 14:49:54,840 [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 14:49:54,840 [DEBUG] @subscriptionmanager.py:76 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-04-10 14:49:55,953 [INFO] @virtwho.py:127 - Created host: ead55c34-b85b-4c50-98f4-a95b8ed86b4f with guests: [4224e5d2-4fcf-2bc2-2559-5846035d3a78, 4224a77f-1c50-42cb-3507-2b68b447ed60]
4. stop virt-who service, then configure virt-who filter out two esx hosts.
[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_uuids="86b2bd00-8bad-11e2-87f4-6c3be514699d,aee4ff00-8c33-11e2-994a-6c3be51d959a"
5. Restart virt-who service, check the virt-who's log
2015-04-10 14:50:34,405 [DEBUG] @virtwho.py:84 - Using config named 'test-esx1'
2015-04-10 14:50:34,405 [INFO] @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-10 14:50:34,405 [DEBUG] @virtwho.py:131 - Starting infinite loop with 10 seconds interval
2015-04-10 14:50:34,547 [DEBUG] @esx.py:51 - Log into ESX
2015-04-10 14:50:35,736 [DEBUG] @esx.py:54 - Creating ESX event filter
2015-04-10 14:50:36,043 [DEBUG] @esx.py:113 - Waiting for ESX changes
2015-04-10 14:50:36,061 [DEBUG] @virt.py:89 - Skipping host 'aee4ff00-8c33-11e2-994a-6c3be51d959a' because its uuid is not included
2015-04-10 14:50:36,061 [DEBUG] @virt.py:89 - Skipping host '86b2bd00-8bad-11e2-87f4-6c3be514699d' because its uuid is not included
2015-04-10 14:50:36,061 [INFO] @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {}
2015-04-10 14:50:36,061 [DEBUG] @subscriptionmanager.py:76 - Authenticating with certificate: /etc/pki/consumer/cert.pem
Result: virt-who skipping two hosts, it send a null host/guest mapping when setting filter out two esx hosts.
Expected result: virt-who should send the two host/guest's mapping info which specified in the configure file to SAM server
If set "exclude_host_uuids="86b2bd00-8bad-11e2-87f4-6c3be514699d,aee4ff00-8c33-11e2-994a-6c3be51d959a"", it will send these two hosts to SAM server.Actually, it shouldn't send these host/guest info to SAM server at this time. It seems the function of "exclude_host_uuids" and "filter_host_uuids" are totally reverse when there are mult-hosts in the configure file. Please ignore commend 8 and commend 9 which is result in the incorrect config. Radek, Could you help me to modify the bug status to ON_QA? I will verify it again, sorry for my mistake, thanks. Moving back to ON_QA. Verified it on virt-who-0.12-2.el6.noarch, virt-who can filter out any host which configured in /etc/virt-who.d/XXX
Checked version:
virt-who-0.12-2.el6.noarch
subscription-manager-1.14.1-1.el6.x86_64
Checked process:
Precondition:There are two esx hosts in this vcenter.
1.Register system to SAM server
2.Configure virt-who run at esx mode and configure a host 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_uuids="aee4ff00-8c33-11e2-994a-6c3be51d959a"
3. Restart virt-who service , check the virt-who log, it can send "aee4ff00-8c33-11e2-994a-6c3be51d959a" to satellite server
2015-04-14 16:28:00,252 [DEBUG] @virtwho.py:84 - Using config named 'test-esx1'
2015-04-14 16:28:00,253 [INFO] @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-14 16:28:00,253 [DEBUG] @virtwho.py:131 - Starting infinite loop with 5 seconds interval
2015-04-14 16:28:00,384 [DEBUG] @esx.py:51 - Log into ESX
2015-04-14 16:28:01,478 [DEBUG] @esx.py:54 - Creating ESX event filter
2015-04-14 16:28:01,791 [DEBUG] @esx.py:113 - Waiting for ESX changes
2015-04-14 16:28:01,809 [DEBUG] @virt.py:89 - Skipping host '86b2bd00-8bad-11e2-87f4-6c3be514699d' because its uuid is not included
2015-04-14 16:28:01,810 [INFO] @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-994a-6c3be51d959a: []}
4. Configure filter two hosts
[test-esx1]
type=esx
server=10.66.79.68
username=Administrator
password=qwer1234P!
owner=ACME_Corporation
env=Library
filter_host_uuids="aee4ff00-8c33-11e2-994a-6c3be51d959a","86b2bd00-8bad-11e2-87f4-6c3be514699d"
5. Restart virt-who service , check the virt-who log, it send two hosts which configured to Satellite server
2015-04-14 16:28:46,732 [DEBUG] @virtwho.py:84 - Using config named 'test-esx1'
2015-04-14 16:28:46,732 [INFO] @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-14 16:28:46,732 [DEBUG] @virtwho.py:131 - Starting infinite loop with 5 seconds interval
2015-04-14 16:28:46,864 [DEBUG] @esx.py:51 - Log into ESX
2015-04-14 16:28:47,969 [DEBUG] @esx.py:54 - Creating ESX event filter
2015-04-14 16:28:48,292 [DEBUG] @esx.py:113 - Waiting for ESX changes
2015-04-14 16:28:48,310 [INFO] @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-994a-6c3be51d959a: [], 86b2bd00-8bad-11e2-87f4-6c3be514699d: [4224a77f-1c50-42cb-3507-2b68b447ed60, 4224e5d2-4fcf-2bc2-2559-5846035d3a78]}
6. Configure excluded one host "aee4ff00-8c33-11e2-994a-6c3be51d959a"
[test-esx1]
type=esx
server=10.66.79.68
username=Administrator
password=qwer1234P!
owner=ACME_Corporation
env=Library
exclude_host_uuids="aee4ff00-8c33-11e2-994a-6c3be51d959a"
7. Restart virt-who service,check the virt-who log,virt-who can't send "aee4ff00-8c33-11e2-994a-6c3be51d959a" to Satellite server
2015-04-14 16:29:42,690 [DEBUG] @esx.py:84 - Wait for ESX event finished, timeout
2015-04-14 16:29:45,754 [DEBUG] @virtwho.py:84 - Using config named 'test-esx1'
2015-04-14 16:29:45,754 [INFO] @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-14 16:29:45,754 [DEBUG] @virtwho.py:131 - Starting infinite loop with 5 seconds interval
2015-04-14 16:29:45,885 [DEBUG] @esx.py:51 - Log into ESX
2015-04-14 16:29:46,986 [DEBUG] @esx.py:54 - Creating ESX event filter
2015-04-14 16:29:47,301 [DEBUG] @esx.py:113 - Waiting for ESX changes
2015-04-14 16:29:47,318 [DEBUG] @virt.py:86 - Skipping host 'aee4ff00-8c33-11e2-994a-6c3be51d959a' because its uuid is excluded
2015-04-14 16:29:47,318 [INFO] @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {86b2bd00-8bad-11e2-87f4-6c3be514699d: [4224a77f-1c50-42cb-3507-2b68b447ed60, 4224e5d2-4fcf-2bc2-2559-5846035d3a78]}
8. Configure excluded two hosts.
[test-esx1]
type=esx
server=10.66.79.68
username=Administrator
password=qwer1234P!
owner=ACME_Corporation
env=Library
exclude_host_uuids="aee4ff00-8c33-11e2-994a-6c3be51d959a","86b2bd00-8bad-11e2-87f4-6c3be514699d"
9. Restart virt-who service ,check the virt-who log,two hosts can't send to Satellite server.
2015-04-14 16:30:31,563 [DEBUG] @virtwho.py:84 - Using config named 'test-esx1'
2015-04-14 16:30:31,564 [INFO] @virtwho.py:475 - Using configuration "test-esx1" ("esx" mode)
2015-04-14 16:30:31,564 [DEBUG] @virtwho.py:131 - Starting infinite loop with 5 seconds interval
2015-04-14 16:30:31,708 [DEBUG] @esx.py:51 - Log into ESX
2015-04-14 16:30:32,799 [DEBUG] @esx.py:54 - Creating ESX event filter
2015-04-14 16:30:33,121 [DEBUG] @esx.py:113 - Waiting for ESX changes
2015-04-14 16:30:33,141 [DEBUG] @virt.py:86 - Skipping host 'aee4ff00-8c33-11e2-994a-6c3be51d959a' because its uuid is excluded
2015-04-14 16:30:33,141 [DEBUG] @virt.py:86 - Skipping host '86b2bd00-8bad-11e2-87f4-6c3be514699d' because its uuid is excluded
2015-04-14 16:30:33,141 [INFO] @subscriptionmanager.py:124 - Sending update in hosts-to-guests mapping: {}
Result: According to result of step3,step5,step7,step9,
filter_host_uuids - if provided, only hosts with uuid in this list will be reported,
exclude_host_uuids - do not report hosts with uuid in this list.
Therefore, verify it
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 |