Bug 1258202 - How to remove "Monitoring add-on"?
Summary: How to remove "Monitoring add-on"?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-30 09:19 UTC by Mishal A.S
Modified: 2019-08-15 05:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-19 09:04:20 UTC
Target Upstream Version:
Embargoed:


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

Description Mishal A.S 2015-08-30 09:19:47 UTC
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 09:57:36 UTC
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 12:48:45 UTC
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 09:04:20 UTC
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.