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:
"sometimes"? Why is it a separate case from bug 1534607?
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.
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
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
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.