Bug 1436206 - [RFE] Add support for returning VMs subresources from GetAllVmsQuery
Summary: [RFE] Add support for returning VMs subresources from GetAllVmsQuery
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.1.1.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact: meital avital
URL:
Whiteboard:
Depends On: 1463633
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-27 12:49 UTC by Tomas Jelinek
Modified: 2021-05-31 12:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-31 12:13:07 UTC
oVirt Team: Virt
Embargoed:
rbarry: ovirt-4.5?
mtessun: planning_ack+
ahadas: devel_ack-
tjelinek: testing_ack?


Attachments (Terms of Use)

Description Tomas Jelinek 2017-03-27 12:49:12 UTC
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.

Comment 1 Martin Tessun 2017-06-08 14:08:42 UTC
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

Comment 2 Tomas Jelinek 2017-06-09 08:51:19 UTC
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).

Comment 3 Michal Skrivanek 2017-07-26 07:00:24 UTC
this is not relevant to webadmin,right,just ovirt-web-ui?

Comment 4 Tomas Jelinek 2017-07-31 14:27:26 UTC
not to webadmin, but to all clients which are using the REST API - e.g. ovirt-web-ui, moVirt, maybe manageiq.

Comment 5 Yaniv Kaul 2017-09-04 10:20:19 UTC
Is this on track to 4.2?

Comment 6 Tomas Jelinek 2017-09-06 07:33:58 UTC
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...

Comment 7 Yaniv Kaul 2017-12-04 11:38:12 UTC
Is this still needed for the change Infra have made for REST in 4.2?

Comment 8 Tomas Jelinek 2017-12-06 09:54:33 UTC
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.

Comment 17 Michal Skrivanek 2020-03-18 15:44:13 UTC
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

Comment 19 Michal Skrivanek 2020-03-18 15:47:19 UTC
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

Comment 21 Michal Skrivanek 2020-03-19 15:41:34 UTC
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.

Comment 23 Arik 2021-05-31 12:13:07 UTC
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.


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