Bug 1247031
| Summary: | Failed to run at off-line mode as "not properly formed: 'guestIds'" | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Liushihui <shihliu> |
| Component: | virt-who | Assignee: | Radek Novacek <rnovacek> |
| Status: | CLOSED ERRATA | QA Contact: | xingge <gxing> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | gxing, hsun, ldai, ovasik, sgao |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | virt-who-0.14-3.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 11:57:26 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: | |||
Fixed in virt-who-0.14-3.el7. Verified it on virt-who-0.14-3.el7.noarch since virt-who can run at fake mode normally.
Verified version
virt-who-0.14-3.el7.noarch
subscription-manager-1.15.9-2.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64
Satellite 6.1.0-20150731.0
Verified process:
1.Make sure system with virt-who can connect to vcenter, register system and run virt-who with "-p"
[root@hp-z220-06 virt-who.d]# virt-who --esx --esx-owner=ACME_Corporation --esx-env=Library --esx-server=10.66.79.57 --esx-username=Administrator --esx-password=qwer1234P! -p -d > /root/ddd
2. Make sure this system can't connect to vcenter directly.Configure virt-who as the following:
[root@hp-z220-06 virt-who.d]# cat /etc/virt-who.d/virt
[fake-virt]
type=fake
file=/root/aaa
is_hypervisor=True
owner=ACME_Corporation
env=Library
[root@hp-z220-06 virt-who.d]# cat /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
3. Restart virt-who service
[root@hp-z220-06 virt-who.d]# service virt-who restart
4. Check the virt-who log.
2015-08-11 14:13:26,283 [DEBUG] @virtwho.py:126 - Using config named 'fake-virt'
2015-08-11 14:13:26,284 [INFO] @virtwho.py:662 - Using configuration "fake-virt" ("fake" mode)
2015-08-11 14:13:26,284 [DEBUG] @virtwho.py:209 - Starting infinite loop with 3600 seconds interval
2015-08-11 14:13:26,322 [DEBUG] @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-08-11 14:13:29,988 [DEBUG] @subscriptionmanager.py:146 - Checking if server has capability 'hypervisor_async'
2015-08-11 14:13:33,228 [DEBUG] @subscriptionmanager.py:158 - Server does not have 'hypervisors_async' capability
2015-08-11 14:13:33,229 [INFO] @subscriptionmanager.py:165 - Sending update in hosts-to-guests mapping: {
"86b2bd00-8bad-11e2-87f4-6c3be514699d": [
{
"guestId": "42390187-0ca7-6139-dadb-549a990f34e3",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "fake"
}
},
{
"guestId": "564d1d17-06d9-46c3-beea-fed130d564e7",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "fake"
}
},
{
"guestId": "4239d107-b6b3-ec67-3317-678288dafe5a",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "fake"
}
}
]
}
Result:
virt-who can run at fake mode normally, it can send the host/guest mapping to satellite server sucessfully, 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-2370.html |
Description of problem: The info which is generated by'virt-who -p'is incorrect. create fake hypervisor pointing to this file will result in failed to run virt-who at off-line mode. Version-Release number of selected component (if applicable): virt-who-0.14-2.el7.noarch subscription-manager-1.15.6-1.el7.x86_64 python-rhsm-1.15.3-1.el7.x86_64 How reproducible: Always Steps to Reproduce: 1.Make sure system with virt-who can connect to vcenter, register system and run virt-who with "-p" [root@hp-z220-06 virt-who.d]# virt-who --esx --esx-owner=ACME_Corporation --esx-env=Library --esx-server=10.66.79.57 --esx-username=Administrator --esx-password=qwer1234P! -p -d > /root/ddd 2. Make sure this system can't connect to vcenter directly.Configure virt-who as the following: [root@hp-z220-06 virt-who.d]# cat /etc/virt-who.d/virt [fake-virt] type=fake file=/root/aaa is_hypervisor=True owner=ACME_Corporation env=Library [root@hp-z220-06 virt-who.d]# cat /etc/sysconfig/virt-who VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 3. Check the /root/ddd # cat /root/ddd [root@hp-z220-06 virt-who.d]# cat /root/ddd {"hypervisors": [{"uuid": "aee4ff00-8c33-11e2-994a-6c3be51d959a", "guests": [{"guestId": "564dab7d-3b72-51a1-eeda-586036106892", "state": 5, "attributes": {"active": 0, "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": 1, "virtWhoType": "esx"}}, {"guestId": "564daa52-c518-b2f0-3c05-a343285910e1", "state": 5, "attributes": {"active": 0, "virtWhoType": "esx"}}]}, {"uuid": "564d9e7a-4128-92b6-7284-6335f6b399be", "guests": []}]} 4. Restart virt-who service [root@hp-z220-06 virt-who.d]# service virt-who restart 5. Check the virt-who log. 2015-07-27 15:28:46,831 [DEBUG] @virtwho.py:120 - Using config named 'fake-virt' 2015-07-27 15:28:46,832 [INFO] @virtwho.py:655 - Using configuration "fake-virt" ("fake" mode) 2015-07-27 15:28:46,845 [DEBUG] @virtwho.py:203 - Starting infinite loop with 3600 seconds interval 2015-07-27 15:28:46,880 [ERROR] @virt.py:301 - Virt backend 'fake-virt' fails with error: Fake virt file '/root/ccc' is not properly formed: 'guestIds' 2015-07-27 15:28:46,880 [INFO] @virt.py:312 - Waiting 3600 seconds before retrying backend 'fake-virt' Actual results: Failed to send host/guest mapping as the file is not properly formed 'guestIds' Expected results: Success to send host/guest mapping when virt-who run at off-line mode Additional info: