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.
Hello Mishal, please, open a ticket with Red Hat Support https://access.redhat.com/support to help you with your issue. Thank you.
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);
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.