Bug 509602 - Entitlement model works differently for kvm and xen guests
Entitlement model works differently for kvm and xen guests
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Sayli Karmarkar
:
Depends On:
Blocks: 456985
  Show dependency treegraph
 
Reported: 2009-07-03 19:03 EDT by Sayli Karmarkar
Modified: 2013-01-10 05:34 EST (History)
5 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 16:38:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
subscription details (162.50 KB, image/png)
2009-07-06 14:41 EDT, Sayli Karmarkar
no flags Details
xen host virtualization page showing 5 guests (170.03 KB, image/png)
2009-07-06 14:41 EDT, Sayli Karmarkar
no flags Details
host's virt tab showing registered and unregistered guests (151.26 KB, image/png)
2009-07-09 14:44 EDT, Sayli Karmarkar
no flags Details
subscriptions details page (132.96 KB, image/png)
2009-07-09 14:45 EDT, Sayli Karmarkar
no flags Details

  None (edit)
Description Sayli Karmarkar 2009-07-03 19:03:17 EDT
Description of problem:

Here is the problem: 
 
1. system-xen is a xen host and system-kvm is a kvm host registered to a satellite in the main org.
2. Both are given virtualization and provisioning entitlement.
3. Note down number of channel and different system entitlements available in the satellite.
4. 4 guests are kickstarted on each host using satellite webui and registered to the satellite. 
(Note that in the case of kvm you need to kickstart a guest to rhel5.3 and then upgrade it to 5.4beta before registering to satellite)
5. Ensure that all systems are registered and recognized properly as fully virt or para virt guests and can be seen in hosts virtualization tab. (In my experiment, there were 4 para-virt xen guests and 4 fully-virt kvm guests)
6. Check entitlement count and it will be the same as in step 3. 
7. Now kickstart 5th xen guest thr webui and make sure it is registered to the satellite at the end. 
8. Check entitlement count. It will still be the same as step3.
---------------------------------------------------------------
9. Now kickstart a kvm guest and upgrade it to rhel5.4beta. Register it to satellite.
10. Check entitlement count and it would have decreased management and provisioning entitlement each by 1 and core server channel entitlements as well.
--------------------------------------------------------------------------------
11. Now delete the system profile through SDC page and entitlement counts are not increased. 
  

Expected results:

Afaik how our entitlement model works is, virtualization entitlements are tied to the org rather than host. So, if org has 2 virt entitlements, total 2*4 = 8 guests can be registered without consuming any extra management and provisioning entitlements. So, if there are 2 virt hosts having virt entitlements registered to this org, 1 host can have 6 guests registered and other one 2 guests and still it would not consume any extra entitlements (Correct me if I am wrong.) 

If this is the case, xen case seems to be the right thing but kvm guest is not. KVM guest should not consume extra entitlements for 5th guest when org has enough virt entitlements. 

When kvm guest is deleted entitlements are not increased which will be the right thing once above scenario is fixed.
Comment 1 Devan Goodwin 2009-07-06 11:30:00 EDT
I think there must be some problems here with step 4 where we note that you must manually upgrade the KVM guests to RHEL 5.4 before registering to Satellite.

The KVM guest kickstarts will automatically rhnreg_ks in ks-post, nothing will appear in the log if this is successful as far as I can tell, so technically even with the non functioning KVM guest detection (as we're still on RHEL 5.3), need to understand what happened when this guest kickstart completed... did we get an unassociated profile that did consume a physical entitlement? (wouldn't this mess with your counts?) 

Lots more investigation needed here IMO.
Comment 2 Devan Goodwin 2009-07-06 11:41:47 EDT
Ok need clarification on some of the above:

- If test is carried out in main org, how many virt entitlements were available? The statement at the end regarding org 2 having 8 entitlements could be confusing, just wanted to make sure this had nothing to do with the actual test and you did in fact have lots of entitlements available in the main org.

- Step 4 really gets confusing, when you create the KVM guests, you mention they must be manually upgraded and thenre-registered, but they were already registered during the kickstart and that would be missing the smbios we need to detect them as guests, thus there should have been a profile created consuming physical entitlements at this time. Do your entitlement counts decrease when you kickstart the KVM guest? (before upgrading and manually re-registering)
Comment 3 Sayli Karmarkar 2009-07-06 14:35:38 EDT
(In reply to comment #2)
> Ok need clarification on some of the above:
> 
> - If test is carried out in main org, how many virt entitlements were
> available? The statement at the end regarding org 2 having 8 entitlements could
> be confusing, just wanted to make sure this had nothing to do with the actual
> test and you did in fact have lots of entitlements available in the main org.
> 

60+ virt entitlements were available in main org at the time of test.
Comment 4 Sayli Karmarkar 2009-07-06 14:38:40 EDT
Here is what I am seeing in latest iso: 

created an org and gave 1 management , 2 provisioning, 1 virt and 0 virt-platform entitlement to the org. I register a xen host and then register guests on it to the satellite..I can see that I could register 5 guests without consuming extra entitlements. 

Screenshots are attached.
Comment 5 Sayli Karmarkar 2009-07-06 14:41:13 EDT
Created attachment 350659 [details]
subscription details
Comment 6 Sayli Karmarkar 2009-07-06 14:41:53 EDT
Created attachment 350660 [details]
xen host virtualization page showing 5 guests
Comment 7 Sayli Karmarkar 2009-07-06 15:36:22 EDT
As far as KVM vs XEN: there are following 2 major differences that we need to fix:

1. When we register kvm guest (with rhnreg_ks manually and not part of kickstart) it does not get provisioning entitlement by default (unlike xen guests).

2. Scenario explained is comment# 4 is not true about kvm guests. If I register a kvm host with few guests on it to this org, give virt entitlement to the host and try register a guest, it does not use free entitlements but consumes management entitlements right from 1st guest registration. 
 
   I checked in the guest details and it IS recognized as fully virt guest, but it consumes entitlements and I cannot see it in host's virtualization tab. 

I have a xen host setup on rlx-3-20 with 5 guests if needed for checking something and latest satellite with testorg created on rlx-2-08. 

Point# 2 mentiones above was tried with last iso in the main org and it did not consume entitlements for kvm guests (try satellite rlx-3-24). So not sure what is changed between 2 isos.
Comment 14 Sayli Karmarkar 2009-07-09 14:41:10 EDT
Moving to verified. 

1. kvm guests are also given provisioning entitlement by default. (same as xen guests)
2. kvm guests are seen in the host's virtualization tab correctly. 
3. I am able to register unlimited kvm guests to the host when org has virt entitlement and host is given virt entitlement. (no matter whether guests are provisioned through sat webui or manually like xen)

Snapshots are attached.
Comment 15 Sayli Karmarkar 2009-07-09 14:44:12 EDT
Created attachment 351116 [details]
host's virt tab showing registered and unregistered guests
Comment 16 Sayli Karmarkar 2009-07-09 14:45:05 EDT
Created attachment 351117 [details]
subscriptions details page
Comment 17 Sayli Karmarkar 2009-09-01 18:19:54 EDT
Got same results as above with stage satellite. Moving to release_pending
Comment 18 Brandon Perkins 2009-09-10 16:38:36 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

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