Bug 653510 - Removal of virt. host does not return the guests back to consume Flex guest entitlements
Removal of virt. host does not return the guests back to consume Flex guest e...
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
540
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Justin Sherrill
Martin Minar
:
Depends On:
Blocks: sat54-errata 668007
  Show dependency treegraph
 
Reported: 2010-11-15 11:15 EST by Garik Khachikyan
Modified: 2015-01-04 16:58 EST (History)
6 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 668007 (view as bug list)
Environment:
Last Closed: 2011-01-17 16:19:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Garik Khachikyan 2010-11-15 11:15:13 EST
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 11:25:40 EST
The bug actually comes from testing:
bug#528761
Comment 3 Garik Khachikyan 2010-11-15 11:37:34 EST
# 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 15:52:48 EST
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 09:59:14 EST
Commited in spacewalk master:  6566eb4eea3ecf3ba8ead251a670010e9860983f

upgrade script: 44bf71c51ba58fbbe24c9346181a831d78d60c08
Comment 11 Florian Nadge 2011-01-14 05:59:00 EST
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 05:59:00 EST
    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 08:05:43 EST
    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 16:19:27 EST
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.