Bug 1537735 - Unable to use paging when searching for VM pools available for specific user sorted by name
Summary: Unable to use paging when searching for VM pools available for specific user ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-4.2.2
: ---
Assignee: Ori Liel
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-23 18:58 UTC by jniederm
Modified: 2018-03-29 11:18 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-4.2.2.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-29 11:18:51 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1534607 0 urgent CLOSED Unable to use paging when searching for VMs available for specific user sorted by name 2021-02-22 00:41:40 UTC
oVirt gerrit 87843 0 master MERGED engine: Support getting filtered, sorted vm-pools with max results 2018-02-19 18:58:42 UTC
oVirt gerrit 87877 0 ovirt-engine-4.2 MERGED engine: Support getting filtered, sorted vm-pools with max results 2018-02-20 08:58:48 UTC

Internal Links: 1534607

Description jniederm 2018-01-23 18:58:39 UTC
Description of problem:
Rest api sometimes hides entities when 'Fiter: true' header, search and max params are used.

Version-Release number of selected component (if applicable):
current master, commit 8ebd58feca

How reproducible:
100%

Steps to Reproduce:
1. Remove all pools from the system
2. Create 3 VM pools named pa, pb, pc
3. Assing UserRole for pool pb for user admin@internal
3. Fire api request
   GET /api/vmpools?max=1&search=SORTBY NAME ASC page 1
   Authorization: Basic ...admin@internal...
   Filter: true

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vm_pools/>

Expected results:
pool pb is returned

Additional info:

Comment 1 Michal Skrivanek 2018-01-24 06:11:32 UTC
"sometimes"?
Why is it a separate case from bug 1534607?

Comment 2 Martin Perina 2018-01-24 09:09:28 UTC
Search engine is not usable with permissions and it would required complete redesign of it to allow that. That's why we decided to internally provide specialized query which is able to fetch VM pools by name for specific user and provide paging support for it.

Comment 5 Radim Hrazdil 2018-02-27 07:37:46 UTC
Verified that only pool with set UserRole permissions for admin is returned for request 
GET /api/vmpools?max=1&search=SORTBY%20NAME%20ASC%20page%201

RHV version 4.2.2

Comment 6 Radim Hrazdil 2018-02-27 08:00:15 UTC
Command used to forge the request was the following:

curl -v -u "<username>:<password>" -H "Content-type: application/json" -H "filter: true"  --insecure  https://<engine_fqdn>/ovirt-engine/api/vmpools/?search=SORTBY%20NAME%20ASC

Comment 7 Sandro Bonazzola 2018-03-29 11:18:51 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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