Bug 1944802 - [RFE] List of all Enabled Repository of all the content hosts using Reporting Templates.
Summary: [RFE] List of all Enabled Repository of all the content hosts using Reporting...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-30 17:07 UTC by Jaskaran Singh Narula
Modified: 2024-02-08 20:15 UTC (History)
8 users (show)

Fixed In Version: foreman-3.1.1.20-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:28:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34695 0 Normal Closed Report template support: list enabled repositories and RPM counts for content hosts 2022-04-01 20:10:00 UTC
Foreman Issue Tracker 34712 0 Normal Ready For Testing Report template request: list enabled repositories and CV package counts 2022-04-01 20:10:01 UTC
Red Hat Issue Tracker SAT-9031 0 None None None 2022-08-22 14:03:21 UTC
Red Hat Issue Tracker SAT-9528 0 None None None 2022-08-22 14:03:26 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:29:21 UTC

Description Jaskaran Singh Narula 2021-03-30 17:07:51 UTC
1. Proposed title of this feature request

>>  [RFE] List of all Enabled Repository of all the content hosts using Reporting Templates.
 

3. What is the nature and description of the request?

>> Using a reporting template to fetch the information for a selected host or all hosts which are repositories are enabled on the content hosts. 


4. Why does the customer need this? (List the business requirements here)

>> Customer have to manually pull this information for every client system from the satellite web UI which he needs to automate. 
 

5. How would the customer like to achieve this? (List the functional requirements here)

>> By using reporting template should be the way where they can get this information on a email as well. 

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

>>

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

>> No
 

8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

>> No

9. Is the sales team involved in this request and do they have any additional input?

>> No

10. List any affected packages or components.

>> Report Templates

11. Would the customer be able to assist in testing this functionality if implemented?

>> Yes

Comment 1 Marek Hulan 2021-04-07 14:13:34 UTC
Thanks for the report, could you please prepare an example of the report output? Or specify what exact columns you'd like to see in the resulting report. That would greatly help, I have a feeling that such report can be already constructed with the existing Satellite version, that depends on how many things we'll need to allow in the safemode.

Comment 9 Ian Ballou 2022-03-29 18:49:15 UTC
Created redmine issue https://projects.theforeman.org/issues/34695 from this bug

Comment 11 Bryan Kearney 2022-04-13 12:03:37 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34695 has been resolved.

Comment 15 Griffin Sullivan 2022-05-05 16:40:10 UTC
Verified in 6.11 snap 18.5 on RHEL 7

Content Host repository count template works with Safe Mode enabled.

Steps to Reproduce:
1. Setup content and attach it to a Content Host

2. Go to Monitor > Report Templates > Create Template

3. Paste into editor and submit:
<%- report_headers 'Host ID', 'Host Name', 'Repository Name', 'Package Count' -%>
<%- load_hosts(includes: [:content_facet => :bound_repositories]).each_record do |host| -%>
<%-   (host.bound_repositories || []).each do |repo| -%>
<%-     report_row(
          'Host ID': host.id,
          'Host Name': host.name,
          'Repository Name': repo,
          'Package Count': repo.content_counts['rpm']
      ) -%>
<%-   end -%>
<%- end -%>
<%= report_render -%>

4. Generate the template

Expected Results:
Report is created with Safe Mode enabled and no issues.

Actual Results:
Report is created with Safe Mode enabled and no issues.

Notes:
You can verify in settings that safe mode is enabled.

Comment 23 Griffin Sullivan 2022-05-23 14:55:12 UTC
Verified in 6.11 snap 21

Host - Enabled Repositories report present in UI and lists repositories attached to content hosts.

Steps to Reproduce:
1. Setup content and attach it to a new content host
2. Make sure you enable and update the repos on the content host
3. Go to Monitor > Report Templates
4. Click Generate next to Host - Enabled Repositories

Expected Results:
A table listing host name, id, repositories, and package count

Actual Results:
A table listing host name, id, repositories, and package count

Comment 26 errata-xmlrpc 2022-07-05 14:28:51 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 (Moderate: Satellite 6.11 Release), 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/RHSA-2022:5498

Comment 27 Griffin Sullivan 2022-08-22 13:51:55 UTC
Verified on 6.11.2 snap 2 on RHEL 8.6

Host - Enabled Repositories report also works on RHEL 8. 

See https://bugzilla.redhat.com/show_bug.cgi?id=1944802#c23 above for steps to reproduce.


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