Created attachment 1489490 [details] Screenshot of problem in RHV Description of problem: RHEV shows Foreman / Satellite nested hostgroups as flat right now. This makes it harder, for example, to distinguish between different nested hostgroups with similar names: library/rhel7/rhev production/rhel7/rhev when displayed flat, which nested 'rhev' hostgroup do I pick? Version-Release number of selected component (if applicable): RHV 4.2.6 Sat6 6.3.3 How reproducible: Use Foreman host provisioning through RHEV Steps to Reproduce: 1. Setup RHV and Sat6 2. Setup Foreman / Sat6 external provider 3. Try to pick correct nested hostgroup for new host Actual results: Nested hostgroups are shown flat Expected results: Nested hostgroups are shown nested Additional info: Was opened and closed for RHEV 3.5 in 2015 as #1223578
Also, it turns out only the first 20 hostgroups are shown. Pagination maybe?
RHV always displayed as flag (only name of the host group), but we swtich to title instead of name, which contain host hierarchy. For example: name | ancestry | title --------------------+----------+---------------------------------------------- testgroup | | testgroup sub_testgroup | 1 | testgroup/sub_testgroup testgroup2 | | testgroup2 sub_testgroup2 | 3 | testgroup2/sub_testgroup2 sub_sub_testgroup2 | 3/4 | testgroup2/sub_testgroup2/sub_sub_testgroup2 So changing this to RFE
(In reply to Maxim Burgerhout from comment #1) > Also, it turns out only the first 20 hostgroups are shown. Pagination maybe? Seems like it. The default api call to foreman for hostgroups returns as part of the request the details of the call: $ curl -s -k -u admin:miFWnEsYMXD5iZPP http://node01:5000/api/v2/hostgroups | python -m json.tool { "page": 1, "per_page": 20, "results": [ { ... } ] } This seems to be common for other foreman resources fetched by ovirt-engine (except for Katello where pagination was implemented). I'd suggest to open a dedicate bug for it, since it expand beyond host group to any other foreman resource. Note for the develop that will fix the limited response size: https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java#L44 Calls to foreman are done without 'per_page=99999' to simulate unlimited page size (all entries in one call) therefore the queries/urls should be changed to include it, i.e.: http://node01:5000/api/v2/hostgroups?per_page=99999 and the response will reflect it: { "page": 1, "per_page": 99999, "results": [ { } ] }
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
(In reply to Moti Asayag from comment #3) > (In reply to Maxim Burgerhout from comment #1) > > Also, it turns out only the first 20 hostgroups are shown. Pagination maybe? > > Seems like it. The default api call to foreman for hostgroups returns as > part of the request the details of the call: > > $ curl -s -k -u admin:miFWnEsYMXD5iZPP http://node01:5000/api/v2/hostgroups > | python -m json.tool > { > "page": 1, > "per_page": 20, > "results": [ > { > ... > } > ] > } > > This seems to be common for other foreman resources fetched by ovirt-engine > (except for Katello where pagination was implemented). > > I'd suggest to open a dedicate bug for it, since it expand beyond host group > to any other foreman resource. > Opened a new bug for pagination: Bug 1645007 > Note for the develop that will fix the limited response size: > https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/ > bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ > ForemanHostProviderProxy.java#L44 > > Calls to foreman are done without 'per_page=99999' to simulate unlimited > page size (all entries in one call) therefore the queries/urls should be > changed to include it, i.e.: > > http://node01:5000/api/v2/hostgroups?per_page=99999 > and the response will reflect it: > { > "page": 1, > "per_page": 99999, > "results": [ > { > } > ] > }
Verified in ovirt-engine-4.3.0.2-0.1.el7.noarch
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/RHEA-2019:1085