Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2094912 - Unable to search the hosts based on the query "ansible_role", if the roles are inherited from the hostgroup.
Summary: Unable to search the hosts based on the query "ansible_role", if the roles ar...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.13.0
Assignee: nalfassi
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-08 15:39 UTC by Gourav Padholia
Modified: 2023-05-03 13:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:21:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27181 0 Normal Closed Add link to hostgroup count for role 2022-09-20 11:32:15 UTC
Red Hat Issue Tracker SAT-14688 0 None None None 2023-01-05 07:10:53 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:21:34 UTC

Description Gourav Padholia 2022-06-08 15:39:20 UTC
Description of problem:
Search the hosts by running the query "ansible_role = role_name" does not lists the hosts if the roles are inherited from the hostgroup. 

Version-Release number of selected component (if applicable):
Satellite 6.10

How reproducible:
100 %

Steps to Reproduce:
1. Go to Hostgroup -> Create host group and Add roles in the Ansible roles tab.
2. Go to Hosts -> Select Hosts -> Edit Host -> Assign the hotgroup and verify that the roles are ansible inherited from the hostgroup. 
3. Go to Satellite web UI -> Hosts -> All Hosts and search the host "ansible_role = role_name"

Actual results:
The query doesn't list the hosts having the roles assigned. 

Expected results:
It should list all the hosts, even if the roles are inherited from the host groups. 

Additional info:

Comment 2 Marek Hulan 2022-08-22 12:58:29 UTC
Nofar, is this now possible thanks to https://projects.theforeman.org/issues/27181?

Comment 3 nalfassi 2022-08-22 13:17:29 UTC
(In reply to Marek Hulan from comment #2)
> Nofar, is this now possible thanks to
> https://projects.theforeman.org/issues/27181?

Yes, that is correct.
Thanks to these last changes, now you search a hostgroup by its ansible roles.
Thank you for noticing it!

Comment 4 nalfassi 2022-08-25 12:55:07 UTC
The fix for this issue would be added on Satellite 6.13, since it was recently merged. If someone wants this fix in earlier versions please let me know.

Comment 5 Brad Buckingham 2022-12-16 19:23:45 UTC
Aligning to 6.13 as this as been confirmed to be in SNAP 3 with rubygem-foreman_ansible-10.1.0-1.el8sat.noarch.

Comment 7 Peter Ondrejka 2023-01-09 15:33:11 UTC
Verified on Satellite 6.13 snap 5, hosts can now be searched using inherited ansible roles

Comment 10 errata-xmlrpc 2023-05-03 13:21:12 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 (Important: Satellite 6.13 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-2023:2097


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