Bug 1142884

Summary: virt-who can't report libvirt guests's attributes and state
Product: Red Hat Enterprise Linux 6 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.6CC: liliu, ovasik, rbalakri, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.12-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1176485 (view as bug list) Environment:
Last Closed: 2015-07-22 07:15:15 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: 1176485    

Description Liushihui 2014-09-17 14:50:18 UTC
Description of problem:
virt-who doesn't support virt-guest attributes and state reporting

Version-Release number of selected component (if applicable):
subscription-manager-1.12.14-5.el6.x86_64
python-rhsm-1.12.5-2.el6.x86_64
virt-who-0.10-8.el6.noarch
katello-headpin-1.4.3.26-1.el6sam_splice.noarch
candlepin-0.9.6.5-1.el6sam.noarch

How reproducible:
Always

Steps to Reproduce:
1. Configure virt-who run at the libvirt mode
#vim /etc/sysconfig/virt-who
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=10
2. Register host and guest to SAM server
3. Check the virt-who log in the /etc/rhsm/rhsm.log

Actual results:
It can't show guest's attributes and state.
2014-09-17 17:13:31,567 [INFO]  @subscriptionmanager.py:110 - Sending list of uuids: ['431fd67a-3fa0-92ed-b617-278960ace763', '5f063e86-757c-1052-d842-c1d27d644377', '746f904a-7e7d-ede8-9ec9-59dd26cdcd2e', '87f3dc7b-6932-af70-c3d6-a88f263572cc', '947b07a0-5958-22a9-c642-6c3f06db032f']

Expected results:
It should show guest's attributes and state.
2014-09-17 17:15:27,256 [INFO]  @subscriptionmanager.py:109 - Sending list of uuids: [{'guestId': '28787a53-af00-b1d4-aa22-775d1460331a', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '4d599a4f-b4c6-1048-be40-2b9f743dcedf', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '6da71c38-edcb-c441-5ec1-395d7cda0a1c', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '95476ebc-469f-7300-89dd-49e35d96a975', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': 'ef396129-a297-53ce-df0a-7efe8be8fc94', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}]

Additional info:
It doesn't exist on virt-who-0.10-7.el6.noarch(last build)

Comment 3 Radek Novacek 2014-09-18 11:37:12 UTC
This is just change in the reporting (logging command). virt-who still sends full report of guests list with states, it's just not logged to the log file anymore.

I can revert it, but I wouldn't consider it as a blocker for 6.6. I'm postponing it to 6.7.

Comment 6 Radek Novacek 2015-02-26 09:44:26 UTC
This bug has been addressed upstream and will be fixed by rebase in RHEL-6.7.

Comment 7 Radek Novacek 2015-02-27 19:32:11 UTC
Fixed by rebase to virt-who-0.12-1.el6.

Comment 9 Liushihui 2015-04-02 03:52:18 UTC
Verified it on virt-who-0.12-2.el6.noarch.
 
Do as the bug's description,check the virt-who's log, it can report guest's attribute and states in the virt-who log.
2015-04-02 11:20:46,040 [DEBUG]  @libvirtd.py:196 - Virtual machine found: 6.4_Server_x86_64: 1ab1ee86-d893-271c-1a65-641d40ea85ff
2015-04-02 11:20:46,045 [DEBUG]  @libvirtd.py:196 - Virtual machine found: 5.10_Server_x86_64: 364d5ce7-9c0f-e4d0-73e7-952abc41b705
2015-04-02 11:20:46,050 [DEBUG]  @libvirtd.py:196 - Virtual machine found: 7.0_Server_x86_64: f49b6fcb-46c8-5a93-7ef1-24f9a5d00667
2015-04-02 11:20:46,057 [DEBUG]  @libvirtd.py:196 - Virtual machine found: 6.5_Client_i386: 8e26c53d-d0ae-db37-3d76-0bb246d955c3
2015-04-02 11:20:46,062 [DEBUG]  @libvirtd.py:196 - Virtual machine found: 6.5_Server_x86_64: 372330c6-6c67-9720-2500-bc356f922cba
2015-04-02 11:20:46,062 [DEBUG]  @libvirtd.py:200 - Libvirt domains found: [{'guestId': '1ab1ee86-d893-271c-1a65-641d40ea85ff', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '364d5ce7-9c0f-e4d0-73e7-952abc41b705', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': 'f49b6fcb-46c8-5a93-7ef1-24f9a5d00667', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '8e26c53d-d0ae-db37-3d76-0bb246d955c3', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '372330c6-6c67-9720-2500-bc356f922cba', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}]

Comment 10 errata-xmlrpc 2015-07-22 07:15:15 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