Bug 1835690

Summary: [RFE] Entitlements report should list number of subscriptions consumed by each host
Product: Red Hat Satellite Reporter: Julio Entrena Perez <jentrena>
Component: ReportingAssignee: Nagoor Shaik <nshaik>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: high Docs Contact:
Priority: high    
Version: 6.7.0CC: bkearney, dmule, egolov, hyu, jjeffers, kupadhya, mhulan, mmccune, nshaik, oprazak, rankumar, sadas, sussen, tbrisker, wpinheir
Target Milestone: 6.9.3Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.18.1.32-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1962834 (view as bug list) Environment:
Last Closed: 2021-07-01 14:56:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
tfm-rubygem-katello-3.16.0.26-2.HFRHBZ1835690.el7sat.noarch.rpm none

Description Julio Entrena Perez 2020-05-14 10:26:48 UTC
Description of problem:
The "Entitlements" report has a column named "Subscription Quantity" which currently displays how many subscriptions exist in the pool (pool.quantity).

Customer would like the report to display the number of subscriptions that the host is consuming. For 2 socket servers that may by 1 sub, for 4 socket servers that may be 2 subs, etc...

Version-Release number of selected component (if applicable):
foreman-1.24.1.21-1.el7sat
tfm-rubygem-katello-3.14.0.20-1.el7sat

How reproducible:
Always

Steps to Reproduce:
1. Run the Entitlements report in Satellite 6.7
2. Observe column "Subscription Quantity" 
3.

Actual results:
Column "Subscription Quantity" displays the number of subscriptions available in the pool.

Expected results:
Column "Subscription Quantity" or some other column displays the number of subscriptions attached to the host.
Alternatively a macro providing the number of subscriptions attached to the host is made available for customer to use it in a custom clone of the Entitlements report. 

Additional info:

Comment 2 Nagoor Shaik 2020-05-15 02:45:11 UTC
Created redmine issue https://projects.theforeman.org/issues/29838 from this bug

Comment 9 Waldirio M Pinheiro 2020-07-30 16:40:54 UTC
*** Bug 1861849 has been marked as a duplicate of this bug. ***

Comment 11 Bryan Kearney 2021-01-15 14:04:55 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/29838 has been resolved.

Comment 12 Mike McCune 2021-04-26 22:04:26 UTC
*** Satellite 6.8.6 Hotfix Available ***

1) Download tfm-rubygem-katello-3.16.0.26-2.HFRHBZ1835690.el7sat.noarch.rpm from this bugzilla to your Satellite

2) stop services:

satellite-maintain service stop

3) Install:

rpm -Uvh  tfm-rubygem-katello-3.16.0.26-2.HFRHBZ1835690.el7sat.noarch.rpm 

4) restart:

satellite-maintain service start

5) resume operations

Comment 13 Mike McCune 2021-04-26 22:33:00 UTC
Created attachment 1775730 [details]
tfm-rubygem-katello-3.16.0.26-2.HFRHBZ1835690.el7sat.noarch.rpm

Comment 18 Lukáš Hellebrandt 2021-06-14 10:32:32 UTC
Verified with Sat 6.9.3 snap 2.0.

Imported a manifest, created a custom product, added all of those to the activation key, registered a host using that activation key. Then WebUI -> Report Templates -> "Subscription - Entitlement report" -> Generate -> Submit.
The resulting file contains column "Subscriptions Consumed" (next to "Subscription Quantity") which contains a number of those subscriptions consumed by all hosts together. The report takes into account all the subscriptions, including custom ones, which can be told apart by having Contract column empty.

Comment 27 errata-xmlrpc 2021-07-01 14:56:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.9.3 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2636