Bug 145537

Summary: Expiring entitlements
Product: Red Hat Satellite 5 Reporter: Jack Neely <jjneely>
Component: OtherAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: msuchy
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-21 07:45:38 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:

Description Jack Neely 2005-01-19 15:05:59 UTC
When managing large organizations with many admins of different levels
I have a big problem with folks that reinstall machines for whatever
reason but leaving the old entitlement in RHN.  

Its pretty clear how this may affect billing.  Including billing where
the Office of the President charges NCSU who charges each College
which, in turn, charges departments and research groups.

I would like to suggest that entitlements where the coresponding
machine has not checked in in X days be removed from RHN.  The time
frame should be configurable.  (Never or X number of days.)  This
feature should be configurable both at a site-wide level and
individual groups.

Comment 1 Jack Neely 2005-01-19 15:09:43 UTC
Ah, as an example:

The UNC System's RHN account currently has 1466 entitlements.  498 of
them are "inactive."  That's 34%.  

Comment 2 Joe deBlaquiere 2005-01-19 20:26:44 UTC
We have generally avoided trying to put a policy in place as every
customer tends to have different requirements for this. Some want it
based on time, some customers want a set of systems that they never
want deleted. 

I'll escalate this to our feature queue.

FYI : you should be able to implement this through RHN XMLRPC APIs to
whatever policy you would like. 

check out:

https://rhn.redhat.com/rpc/api/system/list_user_systems/
https://rhn.redhat.com/rpc/api/system/delete_systems/

If you need help with APIs, you can of course contact Red Hat Support
Services, who can even provide you with example scripts which use
these APIs.


Comment 5 Miroslav Suchý 2011-01-21 07:45:38 UTC
You can do this using script
 delete-old-systems-interactive
from package
 spacewalk-utils

It is already in RHN Satellite 5.4

you can run it as:
 delete-old-systems-interactive.pl -f --idle 20d