Bug 1578507

Summary: In Child/Nested Hostgroup, unable to see Lifecycle Environment which comes from "Inherit Parent (Lifecycle Environment)"
Product: Red Hat Satellite Reporter: Shekhar Raut <sraut>
Component: Host GroupAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: andrew.schofield, inecas, kgaikwad, sraut, tbrisker
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-14 20:53:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shekhar Raut 2018-05-15 18:01:41 UTC
Description of problem:
>>>
In Child/Nested Hostgroup, unable to see Lifecycle Environment which comes from "Inherit Parent (Lifecycle Environment)"

Version-Release number of selected component (if applicable):
>>>
6.3

How reproducible:
>>>

1. Create additional LifeCycle Environments as Dev, Stage, Prod
2. Create hostGroup as HostGroup_Parent1
3. Create hostGroup as HostGroup_Child1 and parent as HostGroup_Parent1
4. Create hostGroup as HostGroup_Child2 and parent as HostGroup_Child1
5. Assign Lifecycle Environment as "Dev"
6. Create hostGroup as HostGroup_Child3 and parent as HostGroup_Child2
7. Assign Lifecycle Environment as "Inherit Parent (Dev)"
8. # hammer hostgroup list
9. # hammer hostgroup info --id 9
	Id:                     9
	Name:                   HostGroup_Child3
	Title:                  HostGroup_Parent1/HostGroup_Child1/HostGroup_Child2/HostGroup_Child3
	Puppet CA Proxy Id:     
	Puppet Master Proxy Id: 
	Puppetclasses:          

	Parameters:             

	Organizations:          
		Sat63
	Parent Id:              6/7/8
	OpenSCAP Proxy:         
	Content View:           
		ID:   
		Name:
	Lifecycle Environment:  
		ID:   
		Name:
	Content Source:         
		ID:   
		Name:
	Kickstart Repository:   
		ID:   
		Name:


Actual results:
>>>
No Lifecycle Environment or Content View updated from "Inherit Parent"

Expected results:
>>>
Nested/Child Hostgroup should have information as per Parent HostGroup for Lifecycle Environment or Content View

Additional info:
>>>
Customer is willing to create Role based on title and Lifecycle Environment to provide access to Users.

customer is using Search as "title ~ HostGroup_Child3 and lifecycle_environment = Dev"

# hammer role filters --id 25
----|----------------------|----------------------------------------------------------|------------|-----------|----------------------|---------------------------------
ID  | RESOURCE TYPE        | SEARCH                                                   | UNLIMITED? | OVERRIDE? | ROLE                 | PERMISSIONS                     
----|----------------------|----------------------------------------------------------|------------|-----------|----------------------|---------------------------------
271 | Hostgroup            | title ~ HostGroup_Child3 and lifecycle_environment = Dev | no         | no        | 01 Host Group Custom | view_hostgroups, edit_hostgroups
----|----------------------|----------------------------------------------------------|------------|-----------|----------------------|---------------------------------

Once we assign Role to any User then user is not able to see HostGroup list

# hammer -u user -p changeme hostgroup list
---|------|-------|------------------|-------------|------
ID | NAME | TITLE | OPERATING SYSTEM | ENVIRONMENT | MODEL
---|------|-------|------------------|-------------|------

But if we assign LifeCycle Environment to Child/Nested HostGroup (not inherit parent) then we will able to see Hostgroup

# hammer -u user -p changeme hostgroup list
---|------------------|----------------------------------------------------------------------|------------------|-------------|------
ID | NAME             | TITLE                                                                | OPERATING SYSTEM | ENVIRONMENT | MODEL
---|------------------|----------------------------------------------------------------------|------------------|-------------|------
9  | HostGroup_Child3 | HostGroup_Parent1/HostGroup_Child1/HostGroup_Child2/HostGroup_Child3 |                  |             |      
---|------------------|----------------------------------------------------------------------|------------------|-------------|------

Comment 1 Brad Buckingham 2018-05-16 19:31:54 UTC
Hi Shekhar,

Out of curiosity, do you see the same with Content Source?  We do have a separate bugzilla (bug 1485949) for it.  

Based on the implementation, I anticipate that they are related to the same root cause; therefore, would it be ok to close this one as a duplicate and expand the other bug to cover this one as well?

Comment 3 Brad Buckingham 2018-06-14 20:53:37 UTC
Hi Shekhar,

I am closing this one as a duplicate of bug 1485949.

I have updated the subject on it to also include Content View and Lifecycle Environment.  If you have any additional details that you'd like to provide, please feel free to add them.  Thanks!

*** This bug has been marked as a duplicate of bug 1485949 ***