Bug 646775

Summary: Misleading number of enterprise_entitled required when rhn-satellite-activate
Product: Red Hat Satellite 5 Reporter: Šimon Lukašík <slukasik>
Component: ServerAssignee: Jan Pazdziora (Red Hat) <jpazdziora>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 540CC: cperry, mminar
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: 2012-02-23 13:33:23 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: 677498    

Description Šimon Lukašík 2010-10-26 07:50:32 UTC
Description of problem:
Activation of satellite with huge db fail when using insufficient
certificate.  But the error listed looks suspicious.

Version-Release number of selected component (if applicable):
Sat530+, Sat540

How reproducible:
deterministic

Steps to Reproduce:
1. Have a large database
2. rhn-satellite-activate with 'lite' cert.
3.
  
Actual results:
Error: You do not have enough unused enterprise_entitled entitlements
in the base org. You will need at least 394374 free entitlements,
based on your current consumption. Please un-entitle the remaining
systems for the activation to proceed.

Expected results:
I have about 26000 system registered, therefore I would expect that I need
26000 management entitlements.


Additional info:

Comment 4 Jan Pazdziora (Red Hat) 2011-12-05 11:00:00 UTC
The problem was introduced by

  commit 480b60089dc138840d769f07563622a77ce5f71c
  Author: Pradeep Kilambi <pkilambi>
  Date:   Wed May 27 17:04:03 2009 -0400

which was presumably a fix for bug 498517 (fixing the error message to show the needed free entitlements for the activation to proceed). However, the arithmetics does not take used entitlements into account, it merely uses all existing entitlements and substracts the new entitlement value.