Bug 766895 - Addition of hypervisorCheckIn call
Summary: Addition of hypervisorCheckIn call
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 5.8
Assignee: William Poteat
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 769266
TreeView+ depends on / blocked
 
Reported: 2011-12-12 19:01 UTC by William Poteat
Modified: 2012-08-10 13:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Addition of hypervisorCheckIn call to allow sending a mapping of host/guest ids for creation/update.
Clone Of:
Environment:
Last Closed: 2012-02-21 06:43:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0154 0 normal SHIPPED_LIVE subscription-manager bug fix update 2012-02-20 15:06:04 UTC

Description William Poteat 2011-12-12 19:01:09 UTC
Incorporation of feature:

Addition of hypervisorCheckIn call to allow sending a mapping of host/guest ids for creation/update.

Comment 3 John Sefler 2012-01-17 23:12:29 UTC
Demonstrating... When virt-who is run, it can successfully send an update to the candlepin server so that the consumer on the host becomes aware of the guests being run on the host.  This feature allows candlepin.standalone=true to be aware of guests being run on a host and therefore provide a realistic "RHEL subscription with up-to N virtual guests" model.



Verifying Version...
[root@margo ~]# rpm -q subscription-manager
subscription-manager-0.98.11-1.el5
[root@margo ~]# rpm -q virt-who
virt-who-0.5-3.el5
[root@margo ~]# curl -k --user admin:admin https://mgmt5.rhq.lab.eng.bos.redhat.com:8443/candlepin/status
{"version":"0.5.10","result":true,"standalone":true,"release":"1"}



On a RHEL58 Server host running xen virtualization...
[root@margo ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.8 Beta (Tikanga)
[root@margo ~]# xen-detect
Running in PV context on Xen v3.1.
[root@margo ~]# virsh list
 Id Name                 State
----------------------------------
  0 Domain-0             running
  2 stacking-guest       idle
[root@margo ~]# virt-what
xen
xen-dom0
[root@margo ~]# subscription-manager facts --list | grep is_guest
virt.is_guest: False

[root@margo ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with id: 362f9bc7-58d6-4c3c-9bdf-e29734037b6f 

^^^ THE HOST IS NOW REGISTERED AND WE HAVE A CONSUMER ID FOR THE HOST



Demonstrating virt-who's ability to upload the virt.uuids of the guests running on the host to candlepin...
[root@margo ~]# virt-who -d
Virt-who is running in libvirt mode
Virtual machine found: stacking-guest: fd0c533a-a5c9-c83e-9265-22a9215327e2
Sending update to updateConsumer: ['fd0c533a-a5c9-c83e-9265-22a9215327e2']




On a RHEL58 Server guest of the host...
[root@localhost ~]# virt-what
xen
xen-domU
[root@localhost ~]# subscription-manager facts --list | grep is_guest
virt.is_guest: True
[root@localhost ~]# 
[root@localhost ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with id: 6e1e5830-8237-4a06-a02b-39681dec96c9 
[root@localhost ~]# 
[root@localhost ~]# subscription-manager facts --list | grep uuid
system.uuid: 6e1e5830-8237-4a06-a02b-39681dec96c9
virt.uuid: fd0c533a-a5c9-c83e-9265-22a9215327e2

^^^ THE GUEST IS NOW REGISTERED AND WE HAVE A CONSUMER ID AND ITS virt.uuid MATCHES WHAT virt-who SENT TO CANDLEPIN



NOW LET'S CALL THE /guests API ON THE HOST CONSUMER AND WE SHOULD FIND THE GUEST...
[root@margo ~]# curl -k --user admin:admin https://mgmt5.rhq.lab.eng.bos.redhat.com:8443/candlepin/consumers/362f9bc7-58d6-4c3c-9bdf-e29734037b6f/guests | python -m simplejson/tool | grep uuid
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5618    0  5618    0     0  39625      0 --:--:-- --:--:-- --:--:--     0
            "virt.uuid": "fd0c533a-a5c9-c83e-9265-22a9215327e2"
        "uuid": "6e1e5830-8237-4a06-a02b-39681dec96c9"
[root@margo ~]# 

^^^^ THANKS TO virt-who's COMMUNICATION TO CANDLEPIN, WE HAVE VERIFIED THAT THE HOST CONSUMER IS AWARE OF THE REGISTERED GUEST SYSTEM'S uuid THROUGH ITS virt.uuid.



Moving to VERIFIED

Comment 4 William Poteat 2012-01-23 16:29:27 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Addition of hypervisorCheckIn call to allow sending a mapping of host/guest ids for creation/update.

Comment 5 errata-xmlrpc 2012-02-21 06:43:56 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.

http://rhn.redhat.com/errata/RHBA-2012-0154.html


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