Bug 1662924 - [RFE] Report that lists all the hosts on which a particular repository is enabled
Summary: [RFE] Report that lists all the hosts on which a particular repository is ena...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
medium vote
Target Milestone: 6.11.0
Assignee: Ryan Verdile
QA Contact: Griffin Sullivan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-02 12:42 UTC by Suraj Patil
Modified: 2022-07-05 14:28 UTC (History)
14 users (show)

Fixed In Version: tfm-rubygem-katello-4.3.0.31-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:27:51 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34711 0 Normal New Report that lists all the hosts on which a particular repository is enabled 2022-04-01 13:55:19 UTC
Red Hat Knowledge Base (Solution) 3771961 0 None None None 2019-01-25 17:04:20 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:28:20 UTC

Description Suraj Patil 2019-01-02 12:42:58 UTC
Description of problem:

Web UI report or the search filter in content hosts page to list all the hosts on which the particular repository is enabled. 

Currently satellite contents the data that which repositories are enabled on the host, we can find it in the "repository sets" tab of content host. But there is no way to get the list of all the hosts on which a particular repository is enabled. 

Version-Release number of selected component (if applicable):
satellite 6.4


Additional info: Workaround

Below query helps to get that. 

# sudo su - postgres -c "psql -d candlepin -c 'select cp_consumer.name from cp_consumer INNER JOIN (select * from cp_content_override where content_label = '\''rh-gluster-3-for-rhel-7-server-rpms'\'' and value = '\''1'\'') x ON x.consumer_id = cp_consumer.id;'"


Note - before running the above command on satellite server please change rh-gluster-3-for-rhel-7-server-rpms as per the repository you want to search for.

Comment 5 Jason Dickerson 2020-01-15 19:52:26 UTC
The query in the description seems to only query overrides for repositories, not the current state.  For instance, if a repository is on by default (no override necessary) it does not seem to appear in the query.  I believe we need to query the information uploaded from clients by the enabled repositories yum plugin.  Is that possible?

Comment 6 Mike McCune 2021-03-11 18:50:48 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in one month's time. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 8 Mike McCune 2021-03-16 15:58:21 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 9 Mike McCune 2021-04-13 17:39:47 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact your Red Hat Account Team. Thank you.

Comment 12 Mike McCune 2021-06-08 21:13:04 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 13 Mike McCune 2021-07-13 21:54:48 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 16 Ryan Verdile 2022-04-01 13:55:18 UTC
Created redmine issue https://projects.theforeman.org/issues/34711 from this bug

Comment 17 Bryan Kearney 2022-04-28 16:01:06 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34711 has been resolved.

Comment 19 Griffin Sullivan 2022-05-05 13:55:41 UTC
Verified in 6.11 snap 18.5 on RHEL 7

User can search for Content Hosts based on which repositories they are entitled to. 

Steps to Reproduce:
1. Sync RHEL 7 server, create cv with repo, and create an activation key with that cv
2. Create a content host from the ak above
3. On the host run: yum repolist all
4. Go to Hosts > Content Hosts
5. Search:  repository = "Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server"

Expected Result:
Host from step 2 appears in the result.

Actual Result:
Host from step 2 appears in the result.


Notes:
Step 3 is required so that the repositories enabled on the host are updated and then reflected in Satellite. You could also do something like yum update instead. However, this could cause issues for repositories like kickstart that don't get updated on the host. However, I think that is outside the scope of this use case, as users will only need to know hosts with repositories where they can actually use the content from it.

Comment 23 errata-xmlrpc 2022-07-05 14:27: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


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