Bug 663923

Summary: RHEL 6 guest on RHEL 6 host - wrong entitlements usage
Product: Red Hat Satellite 5 Reporter: Martin Minar <mminar>
Component: VirtualizationAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 540CC: cperry, jsherril, mkoci
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-07 15:05:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 646488    

Description Martin Minar 2010-12-17 11:17:02 UTC
Description of problem:
When RHEL 6 guest running on RHEL 6 host is registered into Satellite it uses wrong entitlements.

Version-Release number of selected component (if applicable):
Satellite 5.4 with latest erratas
RHEL 6 host with latest erratas
RHEL 6 guest

How reproducible:
Always

Steps to Reproduce:
1. Register RHEL6 guest running on RHEL6 host into Satellite
2. Guest should be marked as virtual guest
3. Check software channel entitlements
  
Actual results:
There is a number of combination of situations:
1. In case host have virtualization/virtual platform entitlement activated in time of registering guest, guest will use flex guest entitlement.
2. When virtualization entitlement of host is changed to virtual platform entitlement or vice versa, guest(s) will use regular entitlement.
3. When virtualization/virtual platform entitlement is removed (leaving host without any virtual entitlement) guest(s) will use flex guest entitlements.
4. In case host don't have any virtual entitlement in time of registering guest, guest will use flex guest entitlement.

Expected results:
1. Guest should not use any entitlement in case of virtual platform and use FGE in case that the host with virtualization already have 4 guests otherwise it should also be "for free".
2. In this case it should never switch to regular entitlements in case there are free FGEs.
3. This is CORRECT behaviour.
4. This is CORRECT behaviour.

Additional info:
Expected behaviour is based on rules that applied on virtual entitlements in times before flex guests were introduced - I'm not sure if/how they changed with introduction of flex guests.

Comment 2 Justin Sherrill 2011-01-05 21:03:00 UTC
Hrm, I am not able to reproduce either scenario 1 or 2.  Are you sure you had installed the rhn-virtualization-host package on the HOST (and run rhn-profile-sync) before running the tests?   It sounds like the host and guest were not associated with each other.

Comment 4 Justin Sherrill 2011-01-06 16:04:39 UTC
Figured out the issue:

SQL> select * from rhnChannelFamilyVirtSubLevel;


does not show the rhel-server-6 channel family as being a 'free channel family' with a virt entitled host.  On my satellite it does. 

Will investigate why your satellite wasn't populated correctly, as this is supposed to come from satellite-sync I believe.

Comment 6 Justin Sherrill 2011-01-06 16:16:28 UTC
It seems it was a problem with the enviornment that the satellite was activated against.  I re-registered the satellite to production (changing rhn_parent in rhn.conf) , ran rhn-satellite-activate and now rhnChannelFamilyVirtSubLevel has 210 entries (before it only had 40).  

I re-tested the scenarios and now they all work on your Satellite.  So it must have been that the environment it was activated against did not have rhnChannelFamilyVirtSubLevel properly populated, or did not pass the correct values down to the satellite.