Bug #33054
closedInheritance does not work for child hostgroups Content view, Content Source and Lifecycle environment
Description
When creating a new child host group, all fields except Content view, Lifecycle environment and Content Source are taken as “inherent Paren(Name-of-Content)”. In the corresponding fields, the three are taken as actual names insteed of for examle as lifecycle environment “inherent Parent(production)” .
If you choose the right entries and enable inheritance and get the host group with the following API command, you will not get “Contentview_id” in the output or you will get “Null”:
[root@foreman-server.local.yt ~]# curl --insecure --connect-timeout 180 --silent --user admin:atix --header 'Accept:application/json,version=2;charset=utf-8' --header Content-Type:application/json -X GET [https://foreman-server.local.yt/api/hostgroups/39]
Steps to Reproduce the problem:
Create a child hostgroup and select parent hostgroup.
All fields of the parent host group will be taken over but instead of “inherit Parent (Name-of-Content view)” directly “Name-of-Content view” will be taken.
Same as above for content source and lifecycle environment.
Actual results:
All fields of the parent host group will be taken over but instead of “inherit Parent (Name-of-Content view)”, directly “Name-of-Content view” will be taken. The issue is the same for content source and lifecycle environment.
Furthermore, if you select “inherit Parent (Name-of-Content view)” under Content view, it is not inherited.
If you call the following api command:
[root@foreman-server.local.yt ~]# curl --insecure --connect-timeout 180 --silent --user User:Passwd --header 'Accept:application/json,version=2;charset=utf-8' --header Content-Type:application/json -X GET [https://foreman-server.local.yt/api/hostgroups/39]
{"content_source_id":1,"content_source_name":"foreman-server.local.yt","content_view_id":null,"content_view_name":"Examle-content-view","lifecycle_environment_id":1,"lifecycle_environment_name":"Examle-Environment","kickstart_repository_id":null,"kickstart_repository_name":null,"subnet_id":null,"subnet_name":"OR-network","operatingsystem_id":null,"operatingsystem_name":"CentOS 8.X","domain_id":null,"domain_name":"local.yt","environment_id":null,"environment_name":"examle-environment","compute_profile_id":null,"compute_profile_name":"1-Small","ancestry":"2","parent_id":2,"parent_name":"Examle-hostgroup Library","ptable_id":null,"ptable_name":"Kickstart default","medium_id":null,"medium_name":"Examle-Installation-madia-name","pxe_loader":"PXELinux BIOS","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"VMWareSUPPORT2","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2021-05-25 14:06:00 UTC","updated_at":"2021-05-25 14:07:47 UTC","id":39,"name":"Examle-hostgroup-test-child","title":"Examle-Parent-hostgroup/Examle-hostgroup-test-child","description":"","puppet_proxy_id":null,"puppet_proxy_name":"foreman-server.local.yt","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"foreman-server.local.yt","openscap_proxy_id":null,"openscap_proxy_name":"foreman-server.local.yt","puppet_proxy":\\{"name":"foreman-server.local.yt","id":1,"url":"https://foreman-server.local.yt:xxxx"}
Expected results:
If you select “inherit Parent (Name-of-Content view)” under Content view, it should take over. The issue is the same for content source and lifecycle environment.
foreman-2.3.3-58009.noarch
foreman-cli-2.3.3-58009.noarch
foreman-proxy-2.3.4-1.el7.noarch
Updated by Bernhard Suttner over 3 years ago
- Project changed from Foreman to Katello
- Category deleted (
Host groups)
Updated by Bernhard Suttner over 3 years ago
- Found in Releases Katello 3.18.3 added
- Found in Releases deleted (
2.3.3)
Updated by Ian Ballou over 3 years ago
- Target version set to Katello 4.3.0
- Triaged changed from No to Yes
Updated by The Foreman Bot over 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Partha Aji
- Pull request https://github.com/Katello/katello/pull/9599 added
Updated by The Foreman Bot about 3 years ago
- Fixed in Releases Katello 4.3.0 added
Updated by Partha Aji about 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|0863618b348582096cb6b39e5069b1c44f946751.
Updated by The Foreman Bot about 3 years ago
- Pull request https://github.com/Katello/katello/pull/9656 added