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 1098019 - Virt-who should report guest attributes in order to support virt-guest-limit feature
Summary: Virt-who should report guest attributes in order to support virt-guest-limit ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: gaoshang
URL:
Whiteboard:
Depends On: 1095597
Blocks: rhsm-rhel511 1098420
TreeView+ depends on / blocked
 
Reported: 2014-05-15 05:47 UTC by Rehana
Modified: 2017-02-07 13:45 UTC (History)
6 users (show)

Fixed In Version: virt-who-0.10-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 1095597
: 1098420 (view as bug list)
Environment:
Last Closed: 2014-09-29 17:49:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1513 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2014-10-14 01:22:23 UTC

Description Rehana 2014-05-15 05:47:52 UTC
+++ This bug was initially created as a clone of Bug #1095597 +++

Description of problem:

Observed that with the virt-who-0.9-1.el5 version, guest attributes are not getting reported on rhel5.11 server, due to this the host(having subscription with guest-limit 4) is not reporting the compliance status to yellow when more no.of guest are running on the host 

Version-Release number of selected component (if applicable):
rpm -qa | grep virt-who
virt-who-0.9-1.el5

[root@jsefler-7server ~]# rpm -q virt-who --changelog | grep guest -B1
* Fri Jan 10 2014 Radek Novacek <rnovacek> 0.8-12


How reproducible:
3/3

Steps to Reproduce:
1.Register and attach guest-limit subscription to host
2.Create guest machines on the host and restart virt-who service
3.Verify the guest attributes using the guest id

[root@ibm-x3250m4-05  curl -u stage_test_43:***** --insecure --request GET https://subscription.rhn.stage.redhat.com:443/subscription/consumers/9e229787-69ea-4cc4-9b5d-0f626f83e69b/guestids | python -m simplejson/tool

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   174    0   174    0     0    141      0 --:--:--  0:00:01 --:--:--  169k
[
    {
        "created": "2014-05-06T12:57:54.000+0000",
        "guestId": "de1ff247-82dd-a3d5-fbd2-4733a5dab296",
        "id": "8a99f98445cce56f0145d19ca3b7251f",
        "updated": "2014-05-06T12:57:54.000+0000"
    }
]
[root@ibm-x3250m4-05 ~]#  curl -u stage_test_43:***** --insecure --request GET https://subscription.rhn.stage.redhat.com:443/subscription/consumers/9e229787-69ea-4cc4-9b5d-0f626f83e69b/guestids/de1ff247-82dd-a3d5-fbd2-4733a5dab296 | python -m simplejson/tool

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   188    0   188    0     0     26      0 --:--:--  0:00:06 --:--:--    41
{
    "attributes": {},  ---> attribute sets are empty
    "created": "2014-05-06T12:57:54.000+0000",
    "guestId": "de1ff247-82dd-a3d5-fbd2-4733a5dab296",
    "id": "8a99f98445cce56f0145d19ca3b7251f",
    "updated": "2014-05-06T12:57:54.000+0000"
}

Actual results:
Observed that the guest ids are not reporting the guest attributes

Expected results:
guest attributes should be present
ex:with virt-who-0.8-12.el7.noarch, guest attributes are getting reported on rhel7

[root@hp-dl360egen8-01 ~]# curl -u stage_2013_model_test:*****  --insecure --request GET https://subscription.rhn.stage.redhat.com:443/subscription/consumers/075618cc-5e06-4187-95f8-050307c31226/guestids/2db50cf9-64c1-4a18-8e6b-b4db25ff2267 | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   248    0   248    0     0     38      0 --:--:--  0:00:06 --:--:--    63
{
    "attributes": {
        "active": "1",
        "hypervisorType": "QEMU",    --->> guest attributes
        "virtWhoType": "libvirt"
    },
    "created": "2014-05-07T13:55:46.000+0000",
    "guestId": "2db50cf9-64c1-4a18-8e6b-b4db25ff2267",
    "id": "8a99f98645d319ec0145d6f7fa242d1e",
    "updated": "2014-05-07T13:55:46.000+0000"
}

Additional info:
The same feature should be included on rhel66 as well

--- Additional comment from Radek Novacek on 2014-05-09 02:18:26 EDT ---

Could you please put virt-who to debug mode (set VIRTWHO_DEBUG=1 in /etc/sysconfig/virt-who), reproduce the bug and then attach the log (/var/log/rhsm/rhsm.log) here? Thank you.

--- Additional comment from Rehana on 2014-05-09 02:40:19 EDT ---

Due to the bug #1095860 against stage server, i couldn't retest against stage; so i have used to my local candlepin set up to retest, hope this helps.

[root@ibm-x3250m4-05 ~]# cat /etc/sysconfig/virt-who  | grep VIRTWHO_DEBUG
VIRTWHO_DEBUG=1

[root@ibm-x3250m4-05 ~]# service virt-who restart
Stopping virt-who: [  OK  ]
Starting virt-who: [  OK  ]


[root@ibm-x3250m4-05 ~]# curl -u username:passwd --insecure --request GET https://ip:8443/candlepin/consumers/13293036-23f9-4e2f-ba3a-72095f93d23e/guestids | python -m simplejson/tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   347    0   347    0     0    248      0 --:--:--  0:00:01 --:--:--     0
[
    {
        "created": "2014-05-09T06:43:51.401+0000", 
        "guestId": "de1ff247-82dd-a3d5-fbd2-4733a5dab296", 
        "id": "8ac6a36245b14d950145dfb941e95807", 
        "updated": "2014-05-09T06:43:51.401+0000"
    }, 
    {
        "created": "2014-05-09T06:43:51.396+0000", 
        "guestId": "b3ace9e5-f699-2ef8-34eb-9ca5c7e1d19b", 
        "id": "8ac6a36245b14d950145dfb941e45805", 
        "updated": "2014-05-09T06:43:51.396+0000"
    }
]
[root@ibm-x3250m4-05 ~]# curl -u username:passwd --insecure --request GET https://ip:8443/candlepin/consumers/13293036-23f9-4e2f-ba3a-72095f93d23e/guestids/de1ff247-82dd-a3d5-fbd2-4733a5dab296 | python -m simplejson/tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   188    0   188    0     0    135      0 --:--:--  0:00:01 --:--:--     0
{
    "attributes": {}, 
    "created": "2014-05-09T06:43:51.401+0000", 
    "guestId": "de1ff247-82dd-a3d5-fbd2-4733a5dab296", 
    "id": "8ac6a36245b14d950145dfb941e95807", 
    "updated": "2014-05-09T06:43:51.401+0000"
}



rhsm.log

 tail -f /var/log/rhsm/rhsm.log
2014-05-09 02:34:33,345 [DEBUG] subscription-manager @connection.py:450 - Making request: GET /candlepin/consumers/13293036-23f9-4e2f-ba3a-72095f93d23e
2014-05-09 02:34:35,088 [DEBUG] subscription-manager @connection.py:473 - Response: status=200, requestUuid=87de3f3b-b4e4-4ee4-827b-10fae0416073
2014-05-09 02:34:35,088 [WARNING] subscription-manager @connection.py:477 - Clock skew detected, please check your system time
2014-05-09 02:34:35,091 [DEBUG] subscription-manager @cache.py:290 - Started thread to write cache: /var/lib/rhsm/cache/product_status.json
2014-05-09 02:34:35,092 [INFO] subscription-manager @managercli.py:194 - Attempted to auto-attach/heal the system.
2014-05-09 02:34:35,096 [DEBUG] subscription-manager @dbus_interface.py:74 - installed python-dbus doesn't support 'get_default_main_loop'
2014-05-09 02:34:35,099 [DEBUG] subscription-manager @dbus_interface.py:67 - installed python-dbus doesn't support 'follow_name_owner_changes'
2014-05-09 02:34:35,350 [INFO] rhsmd @rhsmd:193 - rhsmd started
2014-05-09 02:34:35,355 [INFO] rhsmd @rhsmd:148 - D-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.update_status called with status = 1
2014-05-09 02:34:35,460 [INFO] rhsmd @rhsmd:116 - D-Bus signal com.redhat.SubscriptionManager.EntitlementStatus.entitlement_status_changed emitted
2014-05-09 02:36:20,333 [DEBUG]  @virt-who.py:512 - Starting event loop
2014-05-09 02:36:21,842 [DEBUG]  @virt-who.py:528 - Virt-who is running in libvirt mode
2014-05-09 02:36:21,842 [DEBUG]  @virt-who.py:535 - Starting infinite loop with 3600 seconds interval and event handling
2014-05-09 02:36:21,843 [DEBUG]  @virt.py:56 - Virtual machine found: rhel64: b3ace9e5-f699-2ef8-34eb-9ca5c7e1d19b
2014-05-09 02:36:21,844 [DEBUG]  @virt.py:56 - Virtual machine found: rhel5111: de1ff247-82dd-a3d5-fbd2-4733a5dab296
2014-05-09 02:36:21,845 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: ['b3ace9e5-f699-2ef8-34eb-9ca5c7e1d19b', 'de1ff247-82dd-a3d5-fbd2-4733a5dab296']

--- Additional comment from Radek Novacek on 2014-05-09 03:09:38 EDT ---

Thank you.

There was one patch missing in the upstream master branch of virt-who that is in the RHEL-7 branch. Fixed by upstream commit:

https://git.fedorahosted.org/cgit/virt-who.git/commit/?id=ee127e3a7c4281776f84c2a09229b73be54cd054

Would like to see virt-who support for guest-limit attribute in rhel6.6 as well.

Comment 1 Radek Novacek 2014-05-16 07:38:10 UTC
This feature needs to be also backported to 6.5.z, it's required for Guest Counting feature of SAM 1.4.

Comment 2 Radek Novacek 2014-06-18 13:48:49 UTC
This bug is fixed by rebase to virt-who-0.10-1.el6.

Comment 4 Shwetha Kallesh 2014-06-23 11:42:53 UTC
Virt-who is reporting guest attributes,so marking verified!!

[root@dhcp-0-177 ~]# rpm -qa | grep virt-who
virt-who-0.10-2.el6.noarch 

[root@dhcp-0-177 ~]# subscription-manager register --force
WARNING

This system has already been registered with Red Hat using RHN Classic.

Your system is being registered again using Red Hat Subscription Management. Red Hat recommends that customers only register once.

To learn how to unregister from either service please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
Username: stage_rhscl_dts_test
Password: 
The system has been registered with ID: 2f10ca59-9ef2-4e55-a093-61473850831b 

[root@dhcp-0-177 ~]# curl -u stage_rhscl_dts_test:redhat --insecure --request GET https://subscription.rhn.stage.redhat.com:443/subscription/consumers/2f10ca59-9ef2-4e55-a093-61473850831b/guestids/ | python -m simplejson/tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
108   866    0   866    0     0    498      0 --:--:--  0:00:01 --:--:--  1078
[
    {
        "created": "2014-06-23T11:17:55.000+0000", 
        "guestId": "7c2d3af9-c637-631d-7e34-f0d26cfd14a0", 
        "id": "8a99f98946bac99c0146c872591775cd", 
        "updated": "2014-06-23T11:17:55.000+0000"
    }, 
    {
        "created": "2014-06-23T11:17:55.000+0000", 
        "guestId": "9f3bc1a9-4618-38e6-72d3-48af0773f409", 
        "id": "8a99f98946bac99c0146c872597275ce", 
        "updated": "2014-06-23T11:17:55.000+0000"
    }, 
    {
        "created": "2014-06-23T11:17:55.000+0000", 
        "guestId": "df70aeff-c276-1532-ae90-80c25e3b08e7", 
        "id": "8a99f98946bac99c0146c87259d975cf", 
        "updated": "2014-06-23T11:17:55.000+0000"
    }, 
    {
        "created": "2014-06-23T11:17:55.000+0000", 
        "guestId": "f28f4c7e-b6d1-8816-81c5-66584dcd5ed3", 
        "id": "8a99f98946bac99c0146c8725a4875d0", 
        "updated": "2014-06-23T11:17:55.000+0000"
    }, 
    {
        "created": "2014-06-23T11:17:56.000+0000", 
        "guestId": "fb76bc4b-7ef0-5615-1792-00e5366c910d", 
        "id": "8a99f98946bac99c0146c8725ab075d1", 
        "updated": "2014-06-23T11:17:56.000+0000"
    }


[root@dhcp-0-177 ~]# curl -u stage_rhscl_dts_test:redhat --insecure --request GET https://subscription.rhn.stage.redhat.com:443/subscription/consumers/2f10ca59-9ef2-4e55-a093-61473850831b/guestids/fb76bc4b-7ef0-5615-1792-00e5366c910d | python -m simplejson/tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
124   248    0   248    0     0    148      0 --:--:--  0:00:01 --:--:--   366
{
    "attributes": {
        "active": "1", 
        "hypervisorType": "QEMU", 
        "virtWhoType": "libvirt"
    }, 
    "created": "2014-06-23T11:17:56.000+0000", 
    "guestId": "fb76bc4b-7ef0-5615-1792-00e5366c910d", 
    "id": "8a99f98946bac99c0146c8725ab075d1", 
    "updated": "2014-06-23T11:17:56.000+0000"
}

Comment 5 Bryan Kearney 2014-09-29 17:49:29 UTC
Cleaning up old bugs. These were verified but never closed.


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