Bug 1258202 - How to remove "Monitoring add-on"?
How to remove "Monitoring add-on"?
Status: CLOSED NOTABUG
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI (Show other bugs)
570
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Grant Gainey
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-30 05:19 EDT by Mishal A.S
Modified: 2016-02-19 04:04 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-19 04:04:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
file1 (279.95 KB, image/jpeg)
2015-08-30 05:19 EDT, Mishal A.S
no flags Details

  None (edit)
Description Mishal A.S 2015-08-30 05:19:47 EDT
Created attachment 1068385 [details]
file1

Description of problem:
When we tried to import new certificate, error massage shows like below: 
we want to free XX Monitoring entitlements by following: 
Overview -> Subscription Management -> System Entitlements
But we are not unable to add or remove Monitoring add-on entitlement because there is no "Monitoring" in the drop-sown list (see the attached file1).

How reproducible:
always 

Steps to Reproduce:
1. Overview -> Subscription Management -> System Entitlements
2. Try to select one or more systems.
3. Then, try to add or remove (Monitoring Add-on) 
4. OR check the attached picture. 

Actual results:
There is no "Monitoring" in the drop-sown list.

Expected results:
It should be there, because in my case I wanted to free some monitoring entitlements in order to activate our new certificate without the following error: 

# rhn-satellite-activate --rhn-cert=/root/XXXX.xml -vvv
Certificate specifies 0 of monitoring entitled entitlements.
    There are 86 entitlements used by systems in the base (id 1) organization.
    You might need to unentitle some systems in the base organization.
    You need to free 86 entitlements to match the new certificate.
    In the WebUI, the entitlement is named Monitoring.
Activation failed, will now exit with no changes.


Additional info:
Workaround: 
We have edited the form "Add-On Entitlement" and change the value from "provisioning_entitled"  to "monitoring_entitled", and then the Monitoring entitlement was nicely removed.
Comment 1 Tomas Lestach 2015-08-31 05:57:36 EDT
Hello Mishal,
please, open a ticket with Red Hat Support https://access.redhat.com/support to help you with your issue. Thank you.
Comment 2 Chris Jenkins 2015-11-17 07:48:45 EST
As a work around, you can use an API script to remove the Monitoring Add On entitlements for each system:

#!/usr/bin/perl
use Frontier::Client;
use Data::Dumper;

my $HOST = 'sat.example.com';
my $user = 'rhn-admin';
my $pass = 'password';

my $client = new Frontier::Client(url => "http://$HOST/rpc/api");
my $session = $client->call('auth.login',$user, $pass);
@e = 'monitoring_entitled';

my $systems = $client->call('system.listUserSystems', $session);
foreach my $system (@$systems) {
	$system_id = $system->{'id'};
	$results = $client->call('system.removeEntitlements',$session,$system_id,\@e);
	print " - Removing monitoring Add On for " . $system->{'name'}."\n";
}
$client->call('auth.logout', $session);
Comment 3 Tomas Lestach 2016-02-19 04:04:20 EST
The correct procedure should be to re-activate satellite with the previous entitlement certificate, remove the monitoring add-on entitlements and activate satellite with the new certificate.

Chris, thank you for providing the API script. It looks good, however you need to run it for every organization.

I'm closing this BZ as NOTABUG.

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