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 1048954 - virt-who in rhel7 needs to report which libvirt guests are active
Summary: virt-who in rhel7 needs to report which libvirt guests are active
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: gaoshang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-06 15:40 UTC by Carter Kozak
Modified: 2016-12-01 00:32 UTC (History)
5 users (show)

Fixed In Version: virt-who-0.8-12.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:51:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Carter Kozak 2014-01-06 15:40:32 UTC
Description of problem:

The version of virt-who currently in rhel-7.0 does not support new virt-guest active state reporting, which is required for some new pricing features.

Version-Release number of selected component (if applicable):

Expected results:
Each guestId should contain a set of attributes that the server can use to determine if a given guest is counted as "active"

Additional info:
alikins submitted a patch with the new features.  I don't see it merged into the branch I have checked out, but I'm not sure if it's a devel repo.

Comment 1 Carter Kozak 2014-01-06 17:16:12 UTC
It looks like we might need to rev the required version of python-rhsm for this to prevent us from breaking old candlepin servers with excess data.

I'll post a version when I can, I'll do a new rhel7 build of python-rhsm

Comment 2 Carter Kozak 2014-01-06 20:47:58 UTC
The updated virt-who should depend on python-rhsm-1.10.10
Let me know if there's anything you need.

Comment 3 Radek Novacek 2014-01-10 15:56:52 UTC
This feature has been added upstream:

https://git.fedorahosted.org/cgit/virt-who.git/commit/?h=systemd&id=2ac716f84d87dc75898bd5b24bf56ee159a688a4

Comment 4 Radek Novacek 2014-01-10 16:58:31 UTC
This has been added in virt-who-0.8-12.el7.

Comment 6 Liushihui 2014-01-17 10:05:19 UTC
It only has been fixed on libvirt mode (qemu/kvm), please see the following "Test process 2" ,But under the ESX mode, it still does not support new virt-guest active state reporting, please see the following "Test process 1" 

Version-Release number of selected component (if applicable):
virt-who-0.8-12.el7.noarch
python-rhsm-1.10.10-1.el7.x86_64

Test process 1(incorrect):
RHEL-7.0-20140116.1-Server-x86_64+ ESX5.5 against SAM-1.3.1-RHEL-6-20131219.1
Precondition:
Prepare RHEL7.0 with latest subscription-manager and virt-who installed. 
ESX host has been added to vcenter, two guest have been run on ESX host2
Our test env as the following:
vCenter: 10.66.78.16
ESX host 1: 10.66.13.181
ESX host 2: 10.66.13.187
Test step:
1. Configure virt-who run at the ESX mode
#vim /etc/sysconfig/virt-who
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=10
VIRTWHO_ESX=1
VIRTWHO_ESX_OWNER=ACME_Corporation
VIRTWHO_ESX_ENV=Library
VIRTWHO_ESX_SERVER=10.66.78.16
VIRTWHO_ESX_USERNAME=Administrator
VIRTWHO_ESX_PASSWORD=qwer1234P!
# systemctl restart virt-who
2. Register the RHEL7.0 to SAM server
# Subscription-manager register --username=admin --password=admin
3. Register one of the guest to SAM server
4. Check the virt-who log in the /etc/rhsm/rhsm.log, The virt-guest active state has been report.
2014-01-17 16:44:24,486 [WARNING]  @virt-who.py:515 - Listening for events is not available in VDSM, ESX, RHEV-M or Hyper-V mode
2014-01-17 16:44:24,618 [DEBUG]  @virt-who.py:528 - Virt-who is running in esx mode
2014-01-17 16:44:24,618 [DEBUG]  @virt-who.py:535 - Starting infinite loop with 10 seconds interval and event handling
2014-01-17 16:44:31,909 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {44454c4c-4c00-1031-8053-b8c04f4e3258: [564d8a10-90eb-d40e-42ec-9ca700de054f, 42004d5f-71c0-bf98-b8e2-c914dd572560], 44454c4c-4200-1034-8039-b8c04f503258: []}
Result: The virt-guest active state still hasn't been report in the virt-who log.


Test process 2(correct) :
RHEL-7.0-20140116.1-Server-x86_64(KVM) against SAM-1.3.1-RHEL-6-20131219.1
Test steps:
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
2014-01-17 16:39:18,915 [DEBUG]  @virt.py:66 - Virtual machine found: 7.0_Server_x86_64: e29811e2-cbba-7f38-ec26-9e71d427ac7e
2014-01-17 16:39:18,916 [DEBUG]  @subscriptionmanager.py:101 - Sending list of uuids: [{'guestId': 'e29811e2-cbba-7f38-ec26-9e71d427ac7e', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}]
Result:
The virt-guest active state has been report in the virt-who log. it should be correct.

Comment 7 Radek Novacek 2014-01-17 10:43:18 UTC
Carter, is it required to have guest status working on non-libvirt hypervisors? I vaguely recall that you said that it's sufficient to have it only on libvirt, right?

Comment 8 Carter Kozak 2014-01-17 13:37:36 UTC
For rhel 7 pricing I dont think we are required to get status/other attributes for non-libvirt. That said, it would be very helpful to have data for other hypervisors that mirrors what we're sending up for libvirt, if we can collect it.  If it's not too much trouble and we can get it in now, it'll probably help out with things like satellite and katello.

Comment 9 Radek Novacek 2014-01-22 07:55:19 UTC
I don't think that we have enough time to implement and test this feature for all the hypervisors in time for RHEL-7.0. I'll create new bug targeted 7.1 requesting additional features.

Comment 10 Radek Novacek 2014-01-22 08:03:24 UTC
I have created bug 1056419 for tracking active guests support on other hypervisors than libvirt. 

Since that's not 7.0 stuff, I'll change this bug to request libvirt support only.

Comment 11 Liushihui 2014-01-27 02:57:59 UTC
As it has fixed on the libvirt mode, Verified it on virt-who-0.8-12.el7.noarch

Comment 12 Ludek Smid 2014-06-13 10:51:31 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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