Description of problem: when the host system (with Virtualization entitled and having 2 guests registered) is removed, the guest systems are not returning back to consume Flex Guest Entitlements again. Version-Release number of selected component (if applicable): Satellite 5.4.0 GA-ed How reproducible: always Steps to Reproduce: 1. Activate Satellite with a certificate containing Flex Guest Entitlements for RHEL4 systems (Red Hat Enterprise Linux (core server) channel family) 2. register 2 guests of a virtual host system (not the host still) - they will start consuming flex guest entitlements and not the Red Hat Enterprise Linux (core server) regular ones. 3. Now register the host and give it the "Virtualization" entitlement. From this point the guests should not consume neither flex nor regular ones. 4. Remove the registered host from the Satellite (delete system) 5. Guests are returning to consume the normal (and not flex) entitlements. Actual results: the guests consuming normal entitlements Expected results: should consume flex ones (as the channel family have them available) Additional info:
The bug actually comes from testing: bug#528761
# COMMENT "good" news: they are still convert-able to the Flex Guest stuff (using: Subscription Management -> Virtualization Entitlements -> Guests Consuming Regular Entitlements)
this was a doozy, here's a patch to fix it (will require schema change): --- a/schema/spacewalk/common/views/rhnServerFveCapable.sql +++ b/schema/spacewalk/common/views/rhnServerFveCapable.sql @@ -42,7 +42,7 @@ from inner join rhnPrivateChannelFamily pcf on pcf.channel_family_id = cf.id and pcf.org_id = s.org_id where sc.is_fve = 'N' AND (vi.host_system_id is null OR - exists ( + not exists ( select sg.id from rhnServerGroupMembers sgm inner join rhnServerGroup sg on sgm.server_group_id = sg.id @@ -50,6 +50,6 @@ where sc.is_fve = 'N' inner join rhnServer s2 on s2.id = sgm.server_id where s2.id = vi.host_system_id - and sgt.label not in ('virtualization_host' ,'virtualization_host_platform') ) + and sgt.label in ('virtualization_host' ,'virtualization_host_platform') ) );
Commited in spacewalk master: 6566eb4eea3ecf3ba8ead251a670010e9860983f upgrade script: 44bf71c51ba58fbbe24c9346181a831d78d60c08
Please be so kind and add a few key words to the Technical Notes of this Bugzilla entry using the following structure: Cause: Consequence: Fix: Result: For details, see: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks
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: Cause: Consequence: Fix: Result:
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,7 +1,7 @@ -Cause: +Cause: A bug in server logic detecting systems capable of being converted to flex guests. -Consequence: +Consequence: Virtual guests consuming free entitlements wouldn't be converted to flex guests after removal of their host system. -Fix: +Fix: Corrected logic detecting flex guest systems. -Result:+Result: Virtual guests consuming free entitlements will be correctly converted to flex guests after removal of their virtual host system.
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/RHBA-2011-0155.html