Red Hat Bugzilla – Bug 509602
Entitlement model works differently for kvm and xen guests
Last modified: 2013-01-10 05:34:24 EST
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.
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.
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.
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)
(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.
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.
Created attachment 350659 [details]
Created attachment 350660 [details]
xen host virtualization page showing 5 guests
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.
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.
Created attachment 351116 [details]
host's virt tab showing registered and unregistered guests
Created attachment 351117 [details]
subscriptions details page
Got same results as above with stage satellite. Moving to release_pending
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.