Bug 1416479 - hostgroup_name only showing the last group of the nested group for a host
Summary: hostgroup_name only showing the last group of the nested group for a host
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible
Version: 6.2.6
Hardware: All
OS: Linux
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-25 15:22 UTC by Nikhil Jain
Modified: 2020-06-11 13:14 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-03-01 13:11:31 UTC
Target Upstream Version:
nikjain: needinfo-

Attachments (Terms of Use)
Screenshots of api output from 6.1.10 and 6.2.6 (87.05 KB, application/pdf)
2017-01-25 15:22 UTC, Nikhil Jain
no flags Details

Description Nikhil Jain 2017-01-25 15:22:38 UTC
Created attachment 1244279 [details]
Screenshots of api output from 6.1.10 and 6.2.6

Description of problem:

If I have nested hostgroups like
test/test - nested
test/test - nested/test - nested - again

I add host to the nested group "test/test - nested/test - nested - again" 
and the if I goto /api/v2/hosts/1 in hostgroup_name it only shows the last group in nested group something like:

"hostgroup_name":"test - nested - again"

But in version 6.1.10 it was showing as:

"hostgroup_name":"test/test - nested/test - nested - again"

How reproducible:

Steps to Reproduce:
1. Create a nested group like showed above
2. Add host to the nested group
3. check the api output for api/v2/hosts/<host id>

Actual results:
hostgroup_name only has the value for the last group in the nested group 

Expected results:
hostgroup_name should have value of all the nested groups in it

Additional info:
Adding screenshots for api output of api/v2/hosts/<host id> from both Satellite 6.1.10 and 6.2.6

Comment 5 Tomer Brisker 2017-03-01 13:11:31 UTC
I am closing this issue as this is not a bug in Satellite but rather in the inventory script used by Ansible Tower.
Feel free to reopen if you believe there is still an issue in Satellite here.

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