The GetAllVmsQuery's parameters will be enriched by a parameter similar to: includeSubresource = List<VmSubResource>(); This will be a list of sub resources required to be received together with the VM itself. The supported sub-resources will contain at least: - nics - disk_attachments Others may be added later. The query will than return (in an efficient way!) the VM with all required sub-resources. This query will be utilized by the REST API which will accept this parameters as: GET /ovirt-engine/api/vms/123?follow=disk_attachments,nics and pass them to the query.
Hi Tomas, what would be the added value here? Would that be more sufficient than reading this data from the VM Stanza in the API (diskattachments/nics). Honestly, I cannot see the benefit here. Thanks! Martin
Hey, the added value is the performance and usability for clients talking to the REST API. If you have a VM and need to show it's subresources, it requires additional queries. It does not look too nice for the VM details as the values appearing slowly one by one (especially on slow networks). There are ways how to workaround it but all sacrifice the usability in one way or the other. Even bigger issue is if you need to show aggregated data (like the dashboard for movirt). That is not possible to do without such aggregated queries, because you would have to fire couple of queries for each VM you have which would DoS the engine and also the client would be unusable. This support was already there in the 3.x version of the API and partially is still there in 4.x version, but it is not efficient, it is not generic and on the backend side it is being removed. There is an effort on infra to bring this support back in a better (not ad-hoc) way: https://gerrit.ovirt.org/#/c/76077/ with a support to add optimized queries where needed. This bug is basically a followup for the https://gerrit.ovirt.org/#/c/76077/ to make use of the infrastructure provided and write optimized query for couple of subresources of the VM (nick and disks for sure).
this is not relevant to webadmin,right,just ovirt-web-ui?
not to webadmin, but to all clients which are using the REST API - e.g. ovirt-web-ui, moVirt, maybe manageiq.
Is this on track to 4.2?
Im afraid not :( But ovirt-web-ui already consumes link following also without this optimization and considering it is using pagination the optimization is not needed and is fluent also with 1000+ VMs which was tried. Postponing to 4.3...
Is this still needed for the change Infra have made for REST in 4.2?
this is actually a followup to those changes. The https://gerrit.ovirt.org/#/c/76077/ provides a non-optimized implementation, this BZ is about using the hook the infra provides to implement the optimized lookup of subresources. But Im afraid this is not going to be a priority any time soon even I would love to see it.
This bug didn't get any attention for a while, we didn't have the capacity to make any progress. If you deeply care about it or want to work on it please assign/target accordingly
We didn't get to this bug for more than 2 years, and it's not being considered for the upcoming 4.4. It's unlikely that it will ever be addressed so I'm suggesting to close it. If you feel this needs to be addressed and want to work on it please remove cond nack and target accordingly.
There was no request to optimize the functionality that was added in bz 1463633 (comment 2) for quite a while which means that it's either not used or there's no performance issues with it, in any case there's no sense in putting efforts on optimizing it. If you think differently, please comment on this bz.