Bug 1163608
| Summary: | RFE: allow filtering which hosts are sent by virt-who | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | jalviso <jalviso> | |
| Component: | virt-who | Assignee: | Radek Novacek <rnovacek> | |
| Status: | CLOSED ERRATA | QA Contact: | Li Bin Liu <liliu> | |
| Severity: | high | Docs Contact: | Jiri Herrmann <jherrman> | |
| Priority: | unspecified | |||
| Version: | 7.0 | CC: | achadha, ahumbe, ajanorka, gxing, ovasik, shihliu, wdh, xdmoon | |
| Target Milestone: | rc | Keywords: | FutureFeature | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | virt-who-0.14-1.el7 | 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: | ||||
| : | 1184665 1259295 (view as bug list) | Environment: | ||
| Last Closed: | 2015-11-19 11:55:47 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: | 1184665, 1259295 | |||
|
Description
jalviso
2014-11-13 05:36:58 UTC
I'm not sure I understand proposed idea.
Customer wants some kind of blacklisting/whitelisting of which hosts will be reported to the SAM?
So lets say we have following "full" mapping that we can get from virt-who now:
{
'host-1-uuid': [
'guest-1-on-host-1-uuid',
'guest-2-on-host-1-uuid'
],
'host-2-uuid': [
'guest-1-on-host-2-uuid',
'guest-2-on-host-2-uuid'
]
}
And the customer wants to specify something like this in the configuration file for the given hypervisor:
report_hosts_only = ['host-2-uuid']
And then virt-who will then report this:
{
'host-2-uuid': [
'guest-1-on-host-2-uuid',
'guest-2-on-host-2-uuid'
]
}
Is this what customer wants, do I understand it correctly?
Ok, thanks for confirmation. Marking this bug as RFE for next release. This feature has been implemented upstream and will be fixed by virt-who rebase (bug #1200374). Fixed in virt-who-0.14-1.el7. Verify it on virt-who-0.14-1.el7.noarch since virt-who can filter out any host which configured in /etc/virt-who.d/XXX
Verified version:
virt-who-0.14-1.el7.noarch
subscription-manager-1.15.5-1.el7.x86_64
python-rhsm-1.15.3-1.el7.x86_64
Verified process:
Precondition:There are two esx hosts in this vcenter.
1.Register system to Satellite
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
2015-07-16 14:42:04,336 [DEBUG] @virtwho.py:91 - Using config named 'test-esx1'
2015-07-16 14:42:04,337 [INFO] @virtwho.py:572 - Using configuration "test-esx1" ("esx" mode)
2015-07-16 14:42:04,349 [DEBUG] @virtwho.py:152 - Starting infinite loop with 3600 seconds interval
2015-07-16 14:42:04,384 [DEBUG] @esx.py:53 - Log into ESX
2015-07-16 14:42:05,156 [DEBUG] @esx.py:56 - Creating ESX event filter
2015-07-16 14:42:05,229 [DEBUG] @esx.py:140 - Waiting for ESX changes
2015-07-16 14:42:05,241 [DEBUG] @virt.py:130 - Skipping host '564d9e7a-4128-92b6-7284-6335f6b399be' because its uuid is not included
2015-07-16 14:42:05,242 [INFO] @subscriptionmanager.py:146 - Sending update in hosts-to-guests mapping: {
"aee4ff00-8c33-11e2-994a-6c3be51d959a": [
{
"attributes": {
"active": 0,
"virtWhoType": "esx"
},
"guestId": "564dab7d-3b72-51a1-eeda-586036106892",
"state": 5
},
{
"attributes": {
"active": 1,
"virtWhoType": "esx"
},
"guestId": "4227d611-0abc-fc5e-7538-07ebd83fa9ba",
"state": 1
},
{
"attributes": {
"active": 1,
"virtWhoType": "esx"
},
"guestId": "421aa84b-a49e-e01c-fa72-0b570372dd9d",
"state": 1
},
{
"attributes": {
"active": 0,
"virtWhoType": "esx"
},
"guestId": "564daa52-c518-b2f0-3c05-a343285910e1",
"state": 5
}
]
}
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-07-16 15:19:40,381 [DEBUG] @virtwho.py:226 - virt-who shut down started
2015-07-16 15:19:41,489 [DEBUG] @virtwho.py:91 - Using config named 'test-esx1'
2015-07-16 15:19:41,490 [INFO] @virtwho.py:572 - Using configuration "test-esx1" ("esx" mode)
2015-07-16 15:19:41,503 [DEBUG] @virtwho.py:152 - Starting infinite loop with 3600 seconds interval
2015-07-16 15:19:41,539 [DEBUG] @esx.py:53 - Log into ESX
2015-07-16 15:19:43,365 [DEBUG] @esx.py:56 - Creating ESX event filter
2015-07-16 15:19:43,508 [DEBUG] @esx.py:140 - Waiting for ESX changes
2015-07-16 15:19:43,520 [INFO] @subscriptionmanager.py:146 - Sending update in hosts-to-guests mapping: {
"564d9e7a-4128-92b6-7284-6335f6b399be": [],
"aee4ff00-8c33-11e2-994a-6c3be51d959a": [
{
"attributes": {
"active": 0,
"virtWhoType": "esx"
},
"guestId": "564dab7d-3b72-51a1-eeda-586036106892",
"state": 5
},
{
"attributes": {
"active": 1,
"virtWhoType": "esx"
},
"guestId": "4227d611-0abc-fc5e-7538-07ebd83fa9ba",
"state": 1
},
{
"attributes": {
"active": 1,
"virtWhoType": "esx"
},
"guestId": "421aa84b-a49e-e01c-fa72-0b570372dd9d",
"state": 1
},
{
"attributes": {
"active": 0,
"virtWhoType": "esx"
},
"guestId": "564daa52-c518-b2f0-3c05-a343285910e1",
"state": 5
}
]
}
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-07-16 15:21:59,751 [DEBUG] @virtwho.py:91 - Using config named 'test-esx1'
2015-07-16 15:21:59,752 [INFO] @virtwho.py:572 - Using configuration "test-esx1" ("esx" mode)
2015-07-16 15:21:59,765 [DEBUG] @virtwho.py:152 - Starting infinite loop with 3600 seconds interval
2015-07-16 15:21:59,801 [DEBUG] @esx.py:53 - Log into ESX
2015-07-16 15:22:00,477 [DEBUG] @esx.py:56 - Creating ESX event filter
2015-07-16 15:22:00,586 [DEBUG] @esx.py:140 - Waiting for ESX changes
2015-07-16 15:22:00,598 [DEBUG] @virt.py:127 - Skipping host 'aee4ff00-8c33-11e2-994a-6c3be51d959a' because its uuid is excluded
2015-07-16 15:22:00,599 [INFO] @subscriptionmanager.py:146 - Sending update in hosts-to-guests mapping: {
"564d9e7a-4128-92b6-7284-6335f6b399be": []
}
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","564d9e7a-4128-92b6-7284-6335f6b399be"
9. Restart virt-who service ,check the virt-who log,two hosts can't send to Satellite server.
2015-07-16 15:24:37,826 [DEBUG] @virtwho.py:91 - Using config named 'test-esx1'
2015-07-16 15:24:37,827 [INFO] @virtwho.py:572 - Using configuration "test-esx1" ("esx" mode)
2015-07-16 15:24:37,839 [DEBUG] @virtwho.py:152 - Starting infinite loop with 3600 seconds interval
2015-07-16 15:24:37,874 [DEBUG] @esx.py:53 - Log into ESX
2015-07-16 15:24:38,578 [DEBUG] @esx.py:56 - Creating ESX event filter
2015-07-16 15:24:38,659 [DEBUG] @esx.py:140 - Waiting for ESX changes
2015-07-16 15:24:38,671 [DEBUG] @virt.py:127 - Skipping host 'aee4ff00-8c33-11e2-994a-6c3be51d959a' because its uuid is excluded
2015-07-16 15:24:38,671 [DEBUG] @virt.py:127 - Skipping host '564d9e7a-4128-92b6-7284-6335f6b399be' because its uuid is excluded
2015-07-16 15:24:38,671 [INFO] @subscriptionmanager.py:146 - Sending update in hosts-to-guests mapping: {}
2015-07-16 15:24:38,671 [DEBUG] @subscriptionmanager.py:111 - Authenticating with certificate: /etc/pki/consumer/cert.pem
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
Yes, this can be backported to RHEL-6. Please open a tracking bug for that issue and I'll make sure it'll land in RHEL-6.8. 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-2370.html |