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 1607394 - Host assigned role is also assigned for all hosts from the same hostgroup and marked as inherited from parent
Summary: Host assigned role is also assigned for all hosts from the same hostgroup and...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.4.0
Assignee: Marek Hulan
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-23 12:51 UTC by Lukas Pramuk
Modified: 2019-11-05 23:30 UTC (History)
3 users (show)

Fixed In Version: foreman_ansible-2.2.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 18:56:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24038 0 None None None 2018-07-23 14:10:29 UTC

Description Lukas Pramuk 2018-07-23 12:51:39 UTC
Description of problem:
All available roles are assigned to a host and marked as inherited from parent which is not true.

Hostgroup has only 1 role assigned so only 1 role should be inherited to the host, but in UI you can see all (for me = 2) roles inherited. After hitting "Play Roles" this bad logic is also put in effect for the host (= all roles applied)  


Version-Release number of selected component (if applicable):
@satellite-6.4.0-10.beta.el7sat.noarch (Snap13)
tfm-rubygem-foreman_ansible-2.2.4-1.el7sat.noarch
tfm-rubygem-foreman_ansible_core-2.1.1-1.el7sat.noarch
rubygem-smart_proxy_ansible-2.0.2-3.el7sat.noarch
ansible-2.6.1-1.el7ae.noarch

How reproducible:
100%

Steps to Reproduce:
1. Have Sat with 2 roles imported
2. Assign 1 role to the Hostgroup
3. Create a host based on the hostgroup and see All roles assigned

Actual results:
all roles are inherited

Expected results:
only roles assigned to hostgroup are inherited

Comment 2 Marek Hulan 2018-07-23 13:15:32 UTC
I was testing with reporter on clean installation and we were unable to reproduce. Still investigating but it seems it's not 100% reproducible.

Comment 4 Lukas Pramuk 2018-07-23 14:22:22 UTC
Steps to Reproduce:
1. Have Sat with 2 roles imported
2. Assign Role1 to the Hostgroup
3. Create a Host1 based on the hostgroup but assign also the other Role2 directly to the Host1
4. Create a Host2 based on the hostgroup and see the other Role2 assigned too and marked as inherited from parent

Comment 6 Satellite Program 2018-07-23 16:18:49 UTC
Upstream bug assigned to mhulan

Comment 7 Satellite Program 2018-07-23 16:18:51 UTC
Upstream bug assigned to mhulan

Comment 8 Lukas Pramuk 2018-08-01 14:20:55 UTC
VERIFIED.

@satellite-6.4.0-10.beta.el7sat.noarch (Snap14)
tfm-rubygem-foreman_ansible-2.2.5-1.el7sat.noarch
tfm-rubygem-foreman_ansible_core-2.1.1-1.el7sat.noarch
rubygem-smart_proxy_ansible-2.0.2-3.el7sat.noarch
ansible-2.6.1-1.el7ae.noarch

by the manual reproducer described in comment #4:

1. Have Sat with 2 roles imported
2. Assign Role1 to the Hostgroup
3. Create a Host1 based on the hostgroup but assign also the other Role2 directly to the Host1
4. Create a Host2 based on the hostgroup and see the other Role2 assigned too and marked as inherited from parent

>>> Host2 has correctly assigned Role1 only which is inherited from the hostgroup

Comment 9 Bryan Kearney 2018-10-16 18:56:16 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, 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-2018:2927


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