Bug 653510 - Removal of virt. host does not return the guests back to consume Flex guest entitlements
Summary: Removal of virt. host does not return the guests back to consume Flex guest e...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 540
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: sat54-errata 668007
TreeView+ depends on / blocked
 
Reported: 2010-11-15 16:15 UTC by Garik Khachikyan
Modified: 2015-01-04 21:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: A bug in server logic detecting systems capable of being converted to flex guests. Consequence: Virtual guests consuming free entitlements wouldn't be converted to flex guests after removal of their host system. Fix: Corrected logic detecting flex guest systems. Result: Virtual guests consuming free entitlements will be correctly converted to flex guests after removal of their virtual host system.
Clone Of:
: 668007 (view as bug list)
Environment:
Last Closed: 2011-01-17 21:19:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0155 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2011-01-17 21:19:22 UTC

Description Garik Khachikyan 2010-11-15 16:15:13 UTC
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:

Comment 2 Garik Khachikyan 2010-11-15 16:25:40 UTC
The bug actually comes from testing:
bug#528761

Comment 3 Garik Khachikyan 2010-11-15 16:37:34 UTC
# COMMENT

"good" news: they are still convert-able to the Flex Guest stuff (using: Subscription Management -> Virtualization Entitlements -> Guests Consuming Regular Entitlements)

Comment 4 Justin Sherrill 2011-01-05 20:52:48 UTC
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') )
       );

Comment 7 Justin Sherrill 2011-01-06 14:59:14 UTC
Commited in spacewalk master:  6566eb4eea3ecf3ba8ead251a670010e9860983f

upgrade script: 44bf71c51ba58fbbe24c9346181a831d78d60c08

Comment 11 Florian Nadge 2011-01-14 10:59:00 UTC
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

Comment 12 Florian Nadge 2011-01-14 10:59:00 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:
Cause:

Consequence:

Fix:

Result:

Comment 13 Milan Zázrivec 2011-01-14 13:05:43 UTC
    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.

Comment 15 errata-xmlrpc 2011-01-17 21:19:27 UTC
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


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